linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: linux-mm@kvack.org, Michal Hocko <mhocko@kernel.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH v2] mm, page_alloc: disallow __GFP_COMP in alloc_pages_exact()
Date: Thu, 14 Mar 2019 21:51:10 +0300	[thread overview]
Message-ID: <20190314185110.brwjq5a2jdyzwskn@black.fi.intel.com> (raw)
In-Reply-To: <20190314094249.19606-1-vbabka@suse.cz>

On Thu, Mar 14, 2019 at 09:42:49AM +0000, Vlastimil Babka wrote:
> @@ -4752,7 +4752,7 @@ static void *make_alloc_exact(unsigned long addr, unsigned int order,
>  /**
>   * alloc_pages_exact - allocate an exact number physically-contiguous pages.
>   * @size: the number of bytes to allocate
> - * @gfp_mask: GFP flags for the allocation
> + * @gfp_mask: GFP flags for the allocation, must not contain __GFP_COMP
>   *
>   * This function is similar to alloc_pages(), except that it allocates the
>   * minimum number of pages to satisfy the request.  alloc_pages() can only
> @@ -4768,6 +4768,10 @@ void *alloc_pages_exact(size_t size, gfp_t gfp_mask)
>  	unsigned long addr;
>  
>  	addr = __get_free_pages(gfp_mask, order);
> +
> +	if (WARN_ON_ONCE(gfp_mask & __GFP_COMP))
> +		return NULL;
> +

Shouldn't it be before __get_free_pages() call? :P

>  	return make_alloc_exact(addr, order, size);
>  }
>  EXPORT_SYMBOL(alloc_pages_exact);

-- 
 Kirill A. Shutemov


  parent reply	other threads:[~2019-03-14 18:51 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
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 [this message]
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=20190314185110.brwjq5a2jdyzwskn@black.fi.intel.com \
    --to=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --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