From: Michal Hocko <mhocko@kernel.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Goldwyn Rodrigues <rgoldwyn@suse.de>,
Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
linux-mm@kvack.org, lsf-pc@lists.linux-foundation.org
Subject: Re: [Lsf-pc] [LSF/MM ATTEND] memory allocation scope
Date: Thu, 15 Feb 2018 17:02:41 +0100 [thread overview]
Message-ID: <20180215160241.GI7275@dhcp22.suse.cz> (raw)
In-Reply-To: <1518710257.5399.4.camel@HansenPartnership.com>
On Thu 15-02-18 07:57:37, James Bottomley wrote:
> On Thu, 2018-02-15 at 15:48 +0100, Michal Hocko wrote:
> > On Wed 14-02-18 16:51:53, Goldwyn Rodrigues wrote:
> > >
> > >
> > > Discussion with the memory folks towards scope based allocation
> > > I am working on converting some of the GFP_NOFS memory allocation
> > > calls to new scope API [1]. While other allocation types (noio,
> > > nofs, noreclaim) are covered. Are there plans for identifying scope
> > > of GFP_ATOMIC allocations? This should cover most (if not all) of
> > > the allocation scope.
> >
> > There was no explicit request for that but I can see how some users
> > might want it. I would have to double check but maybe this would
> > allow vmalloc(GFP_ATOMIC). There were some users but most of them
> > could have been changed in some way so the motivation is not very
> > large.
>
> We have to be careful about that: most GFP_ATOMIC allocations are in
> drivers and may be for DMA'able memory. We can't currently use vmalloc
> memory for DMA to kernel via block because bio_map_kern() uses
> virt_to_page() which assumes offset mapping. The latter is fixable,
> obviously, but is it worth fixing? Very few GFP_ATOMIC allocations in
> drivers will be for large chunks.
Yes this might be not worth bothering. But from the conceptual POV
GFP_ATOMIC resp. GFP_NOWAIT is very often a scope context - IRQs,
preemption or RCU. So protecting all allocations from that context makes
some sense. Not sure this is really worth spending another context bit
though.
--
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>
next prev parent reply other threads:[~2018-02-15 16:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 22:51 Goldwyn Rodrigues
2018-02-15 3:53 ` NeilBrown
2018-02-15 14:19 ` Goldwyn Rodrigues
2018-02-15 14:48 ` Michal Hocko
2018-02-15 15:57 ` [Lsf-pc] " James Bottomley
2018-02-15 16:02 ` Michal Hocko [this message]
2018-02-15 16:06 ` Michal Hocko
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=20180215160241.GI7275@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=rgoldwyn@suse.de \
/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