From: Michal Hocko <mhocko@suse.cz>
To: Vladimir Davydov <vdavydov@parallels.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH TRIVIAL] memcg: remove unused code from kmem_cache_destroy_work_func
Date: Mon, 20 Jan 2014 17:48:01 +0100 [thread overview]
Message-ID: <20140120164801.GF2626@dhcp22.suse.cz> (raw)
In-Reply-To: <1390209723-11869-1-git-send-email-vdavydov@parallels.com>
OK, it seems as a left over from an earlier code reworks but
22933152934f3 doesn't seem to contain any code following that if-else
so maybe review driven changes.
On Mon 20-01-14 13:22:03, Vladimir Davydov wrote:
> Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
> ---
> mm/memcontrol.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 7f1a356..7f1511d 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -3311,11 +3311,9 @@ static void kmem_cache_destroy_work_func(struct work_struct *w)
> * So if we aren't down to zero, we'll just schedule a worker and try
> * again
> */
> - if (atomic_read(&cachep->memcg_params->nr_pages) != 0) {
> + if (atomic_read(&cachep->memcg_params->nr_pages) != 0)
> kmem_cache_shrink(cachep);
> - if (atomic_read(&cachep->memcg_params->nr_pages) == 0)
> - return;
> - } else
> + else
> kmem_cache_destroy(cachep);
> }
>
> --
> 1.7.10.4
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2014-01-20 16:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 9:22 Vladimir Davydov
2014-01-20 16:48 ` Michal Hocko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140120164801.GF2626@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vdavydov@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox