From: Michal Hocko <mhocko@suse.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>,
linux-mm@kvack.org,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Mel Gorman <mgorman@techsingularity.net>
Subject: Re: [PATCH v2] mm, page_alloc: disallow __GFP_COMP in alloc_pages_exact()
Date: Thu, 14 Mar 2019 14:29:33 +0100 [thread overview]
Message-ID: <20190314132933.GL7473@dhcp22.suse.cz> (raw)
In-Reply-To: <s5ha7hxsikl.wl-tiwai@suse.de>
On Thu 14-03-19 14:15:38, Takashi Iwai wrote:
> On Thu, 14 Mar 2019 13:09:39 +0100,
> Michal Hocko wrote:
> >
> > On Thu 14-03-19 12:56:43, Takashi Iwai wrote:
> > > On Thu, 14 Mar 2019 12:36:26 +0100,
> > > Michal Hocko wrote:
> > > >
> > > > On Thu 14-03-19 11:30:03, Vlastimil Babka wrote:
[...]
> > > > > I initially went with 2 as well, as you can see from v1 :) but then I looked at
> > > > > the commit [2] mentioned in [1] and I think ALSA legitimaly uses __GFP_COMP so
> > > > > that the pages are then mapped to userspace. Breaking that didn't seem good.
> > > >
> > > > It used the flag legitimately before because they were allocating
> > > > compound pages but now they don't so this is just a conversion bug.
> > >
> > > We still use __GFP_COMP for allocation of the sound buffers that are
> > > also mmapped to user-space. The mentioned commit above [2] was
> > > reverted later.
> >
> > Yes, I understand that part. __GFP_COMP makes sense on a comound page.
> > But if you are using alloc_pages_exact then the flag doesn't make sense
> > because split out should already do what you want. Unless I am missing
> > something.
>
> The __GFP_COMP was taken as a sort of workaround for the problem wrt
> mmap I already forgot. If it can be eliminated, it's all good.
Without __GFP_COMP you would get tail pages which are not setup properly
AFAIU. With alloc_pages_exact you should get an "array" of head pages
which are properly reference counted. But I might misunderstood the
original problem which __GFP_COMP tried to solve.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2019-03-14 13:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-14 9:39 [PATCH] " Vlastimil Babka
2019-03-14 9:42 ` [PATCH v2] " Vlastimil Babka
2019-03-14 10:15 ` Michal Hocko
2019-03-14 10:30 ` Vlastimil Babka
2019-03-14 11:36 ` Michal Hocko
2019-03-14 11:56 ` Takashi Iwai
2019-03-14 12:09 ` Michal Hocko
2019-03-14 13:15 ` Takashi Iwai
2019-03-14 13:29 ` Michal Hocko [this message]
2019-03-14 16:52 ` Takashi Iwai
2019-03-14 17:37 ` Hugh Dickins
2019-03-14 18:00 ` Takashi Iwai
2019-03-14 18:15 ` Hugh Dickins
2019-03-14 20:13 ` Takashi Iwai
2019-03-14 18:51 ` Kirill A. Shutemov
2019-03-18 12:21 ` [PATCH v3] " Vlastimil Babka
2019-03-18 12:43 ` Michal Hocko
2019-03-19 8:45 ` Kirill A. Shutemov
2019-03-19 9:47 ` Mel Gorman
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=20190314132933.GL7473@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=tiwai@suse.de \
--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