Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1657165
| From | Yu Zhao <yuzhao@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] memcg: refactor mem_cgroup_resize_limit() |
| Date | 2017-06-04 22:40 +0200 |
| Message-ID | <tOKtA-1zy-13@gated-at.bofh.it> (permalink) |
| References | <tNHo5-IM-1@gated-at.bofh.it> <tOK0x-1qd-3@gated-at.bofh.it> <tOKad-1to-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Jun 04, 2017 at 11:09:42PM +0300, Vladimir Davydov wrote:
> On Sun, Jun 04, 2017 at 01:04:37PM -0700, Yu Zhao wrote:
> > @@ -2498,22 +2449,24 @@ static int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg,
> > }
> >
> > mutex_lock(&memcg_limit_mutex);
> > - if (limit < memcg->memory.limit) {
> > + inverted = memsw ? limit < memcg->memory.limit :
> > + limit > memcg->memsw.limit;
> > + if (inverted)
> > mutex_unlock(&memcg_limit_mutex);
> > ret = -EINVAL;
> > break;
> > }
>
> For some reason, I liked this patch more without this extra variable :-)
Well, I'll refrain myself from commenting more because we are now at
the risk of starting a coding style war over this.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] memcg: refactor mem_cgroup_resize_limit() Yu Zhao <yuzhao@google.com> - 2017-06-02 01:10 +0200
Re: [PATCH] memcg: refactor mem_cgroup_resize_limit() Nikolay Borisov <n.borisov.lkml@gmail.com> - 2017-06-02 09:40 +0200
Re: [PATCH] memcg: refactor mem_cgroup_resize_limit() Yu Zhao <yuzhao@google.com> - 2017-06-04 21:50 +0200
Re: [PATCH] memcg: refactor mem_cgroup_resize_limit() Vladimir Davydov <vdavydov.dev@gmail.com> - 2017-06-03 17:20 +0200
[PATCH v2] memcg: refactor mem_cgroup_resize_limit() Yu Zhao <yuzhao@google.com> - 2017-06-04 22:10 +0200
Re: [PATCH v2] memcg: refactor mem_cgroup_resize_limit() Vladimir Davydov <vdavydov.dev@gmail.com> - 2017-06-04 22:20 +0200
Re: [PATCH v2] memcg: refactor mem_cgroup_resize_limit() Yu Zhao <yuzhao@google.com> - 2017-06-04 22:40 +0200
[PATCH v3] memcg: refactor mem_cgroup_resize_limit() Yu Zhao <yuzhao@google.com> - 2017-06-04 23:20 +0200
csiph-web