Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1727658
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] mm/slub: wake up kswapd for initial high order allocation |
| Date | 2017-09-06 19:30 +0200 |
| Message-ID | <umMjg-4Ud-15@gated-at.bofh.it> (permalink) |
| References | <umAi5-4Cl-3@gated-at.bofh.it> <umKU9-3Qp-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed 06-09-17 10:59:09, Cristopher Lameter wrote:
> On Wed, 6 Sep 2017, js1304@gmail.com wrote:
>
> > --- a/mm/slub.c
> > +++ b/mm/slub.c
> > @@ -1578,8 +1578,12 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
> > * so we fall-back to the minimum order allocation.
> > */
> > alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL;
> > - if ((alloc_gfp & __GFP_DIRECT_RECLAIM) && oo_order(oo) > oo_order(s->min))
> > - alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~(__GFP_RECLAIM|__GFP_NOFAIL);
> > + if (oo_order(oo) > oo_order(s->min)) {
> > + if (alloc_gfp & __GFP_DIRECT_RECLAIM) {
> > + alloc_gfp |= __GFP_NOMEMALLOC;
> > + alloc_gfp &= ~__GFP_DIRECT_RECLAIM;
> > + }
> > + }
> >
>
> Can we come up with another inline function in gfp.h for this as well?
What do you mean? The oo_order thing?
> Well and needing these functions to manipulate flags actually indicates
> that we may need a cleanup of the GFP flags at some point. There is a buch
> of flags that disable things and some that enable things.
Good luck with that
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/2] mm/slub: wake up kswapd for initial high order allocation js1304@gmail.com - 2017-09-06 06:40 +0200
Re: [PATCH 1/2] mm/slub: wake up kswapd for initial high order allocation Vlastimil Babka <vbabka@suse.cz> - 2017-09-06 10:10 +0200
Re: [PATCH 1/2] mm/slub: wake up kswapd for initial high order allocation Christopher Lameter <cl@linux.com> - 2017-09-06 18:00 +0200
Re: [PATCH 1/2] mm/slub: wake up kswapd for initial high order allocation Michal Hocko <mhocko@kernel.org> - 2017-09-06 19:30 +0200
csiph-web