linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Oscar Salvador <osalvador@suse.de>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org, mhocko@suse.com,
	david@redhat.com
Subject: Re: [PATCH v2] mm, page_alloc: enable pcpu_drain with zone capability
Date: Wed, 12 Dec 2018 15:47:02 +0100	[thread overview]
Message-ID: <20181212144657.qpf27qhypda4e545@d104.suse.de> (raw)
In-Reply-To: <20181212142550.61686-1-richard.weiyang@gmail.com>

On Wed, Dec 12, 2018 at 10:25:50PM +0800, Wei Yang wrote:
> drain_all_pages is documented to drain per-cpu pages for a given zone (if
> non-NULL). The current implementation doesn't match the description though.
> It will drain all pcp pages for all zones that happen to have cached pages
> on the same cpu as the given zone. This will leave to premature pcp cache
> draining for zones that are not of an interest for the caller - e.g.
> compaction, hwpoison or memory offline.
> 
> This would force the page allocator to take locks and potential lock
> contention as a result.
> 
> There is no real reason for this sub-optimal implementnation. Replace
> per-cpu work item with a dedicated structure which contains a pointer to
> zone and pass it over to the worker. This will get the zone information all
> the way down to the worker function and do the right job.
> 
> [mhocko@suse.com: refactor the whole changelog]
> 
> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
> Acked-by: Michal Hocko <mhocko@suse.com>

Looks to me

Reviewed-by: Oscar Salvador <osalvador@suse.de>

thanks

-- 
Oscar Salvador
SUSE L3

  reply	other threads:[~2018-12-12 14:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12  0:29 [PATCH] " Wei Yang
2018-12-12 12:52 ` Michal Hocko
2018-12-12 14:22   ` Wei Yang
2018-12-12 14:25 ` [PATCH v2] " Wei Yang
2018-12-12 14:47   ` Oscar Salvador [this message]
2018-12-12 14:57     ` Wei Yang
2018-12-12 17:00   ` David Hildenbrand
2018-12-13  1:18     ` Wei Yang

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=20181212144657.qpf27qhypda4e545@d104.suse.de \
    --to=osalvador@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=richard.weiyang@gmail.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