linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: qiwuchen55@gmail.com, cl@linux.com, penberg@kernel.org,
	rientjes@google.com, iamjoonsoo.kim@lge.com,
	akpm@linux-foundation.org
Cc: linux-mm@kvack.org, chenqiwu <chenqiwu@xiaomi.com>
Subject: Re: [PATCH] mm/slub.c: replace cpu_slab->partial with wrapped APIs
Date: Wed, 26 Feb 2020 19:15:03 +0100	[thread overview]
Message-ID: <94b29ab3-3789-a9b7-0a66-0acfaef6ca9f@suse.cz> (raw)
In-Reply-To: <1581951895-3038-1-git-send-email-qiwuchen55@gmail.com>

On 2/17/20 4:04 PM, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
> 
> There are slub_percpu_partial() and slub_set_percpu_partial()
> APIs to wrap kmem_cache->cpu_partial. This patch will use the
> two to replace cpu_slab->partial in slub code.
> 
> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>

Same comment as for "[PATCH v2] mm/slub.c: replace kmem_cache->cpu_partial with
wrapped APIs". This function generates code only with CONFIG_SLUB_CPU_PARTIAL
and so the wrapper just obfuscates the code unnecessarily.

> ---
>  mm/slub.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index 17dc00e..15bb0ba 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2207,11 +2207,11 @@ static void unfreeze_partials(struct kmem_cache *s,
>  	struct kmem_cache_node *n = NULL, *n2 = NULL;
>  	struct page *page, *discard_page = NULL;
>  
> -	while ((page = c->partial)) {
> +	while ((page = slub_percpu_partial(c))) {
>  		struct page new;
>  		struct page old;
>  
> -		c->partial = page->next;
> +		slub_set_percpu_partial(c, page);
>  
>  		n2 = get_node(s, page_to_nid(page));
>  		if (n != n2) {
> 



  reply	other threads:[~2020-02-26 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 15:04 qiwuchen55
2020-02-26 18:15 ` Vlastimil Babka [this message]
2020-02-26 18:26   ` Christopher Lameter

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=94b29ab3-3789-a9b7-0a66-0acfaef6ca9f@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=chenqiwu@xiaomi.com \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=qiwuchen55@gmail.com \
    --cc=rientjes@google.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