From: Mel Gorman <mgorman@techsingularity.net>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
Hillf Danton <hillf.zj@alibaba-inc.com>,
Jesper Dangaard Brouer <brouer@redhat.com>
Subject: Re: [PATCH 3/3] mm, page_allocator: Only use per-cpu allocator for irq-safe requests
Date: Fri, 13 Jan 2017 10:18:06 +0000 [thread overview]
Message-ID: <20170113101806.a4pm4ltxrgntp6sn@techsingularity.net> (raw)
In-Reply-To: <a99e507e-ae3c-ef45-5790-fb286bdc279d@suse.cz>
On Thu, Jan 12, 2017 at 06:02:38PM +0100, Vlastimil Babka wrote:
> > Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
> > Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
> > Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
>
> Very promising! But I have some worries. Should we put something like
> VM_BUG_ON(in_interrupt()) into free_hot_cold_page() and rmqueue_pcplist() to
> catch future potential misuses and also document this requirement? Also
> free_hot_cold_page() has other call sites besides __free_pages() and I'm not
> sure if those are all guaranteed to be !IRQ? E.g. free_hot_cold_page_list()
> which is called by release_page() which uses irq-safe lock operations...
>
They are not guaranteed to be !irq but the API is easier to call incorrectly
than it could be. I think the checks can be pushed further down without
excessive overhead.
> Smaller nit below:
>
> > @@ -2453,8 +2450,8 @@ void free_hot_cold_page(struct page *page, bool cold)
> >
> > migratetype = get_pfnblock_migratetype(page, pfn);
> > set_pcppage_migratetype(page, migratetype);
> > - local_irq_save(flags);
> > - __count_vm_event(PGFREE);
> > + preempt_disable();
> > + count_vm_event(PGFREE);
>
> AFAICS preempt_disable() is enough for using __count_vm_event(), no?
>
It is, I'll fix it.
Thanks.
--
Mel Gorman
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:[~2017-01-13 10:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 10:42 [PATCH 0/3] Use per-cpu allocator for !irq requests and prepare for a bulk allocator Mel Gorman
2017-01-12 10:42 ` [PATCH 1/3] mm, page_alloc: Split buffered_rmqueue Mel Gorman
2017-01-12 15:44 ` Vlastimil Babka
2017-01-12 17:21 ` Mel Gorman
2017-01-13 13:27 ` Vlastimil Babka
2017-01-12 10:42 ` [PATCH 2/3] mm, page_alloc: Split alloc_pages_nodemask Mel Gorman
2017-01-12 10:43 ` [PATCH 3/3] mm, page_allocator: Only use per-cpu allocator for irq-safe requests Mel Gorman
2017-01-12 17:02 ` Vlastimil Babka
2017-01-13 10:18 ` Mel Gorman [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=20170113101806.a4pm4ltxrgntp6sn@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=akpm@linux-foundation.org \
--cc=brouer@redhat.com \
--cc=hillf.zj@alibaba-inc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
/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