linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/page_alloc: Modify the comment section for alloc_contig_pages()
@ 2021-12-15  5:17 Anshuman Khandual
  2021-12-16 10:59 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Anshuman Khandual @ 2021-12-15  5:17 UTC (permalink / raw)
  To: linux-mm; +Cc: Anshuman Khandual, Andrew Morton, linux-kernel

Just clarify, that the alloc_contig_pages() allocated range will always be
aligned to the requested nr_pages.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c5952749ad40..0d74ea524dd4 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -9214,8 +9214,8 @@ static bool zone_spans_last_pfn(const struct zone *zone,
  * for allocation requests which can not be fulfilled with the buddy allocator.
  *
  * The allocated memory is always aligned to a page boundary. If nr_pages is a
- * power of two then the alignment is guaranteed to be to the given nr_pages
- * (e.g. 1GB request would be aligned to 1GB).
+ * power of two, then allocated range is also guaranteed to be aligned to same
+ * nr_pages (e.g. 1GB request would be aligned to 1GB).
  *
  * Allocated pages can be freed with free_contig_range() or by manually calling
  * __free_page() on each allocated page.
-- 
2.20.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/page_alloc: Modify the comment section for alloc_contig_pages()
  2021-12-15  5:17 [PATCH] mm/page_alloc: Modify the comment section for alloc_contig_pages() Anshuman Khandual
@ 2021-12-16 10:59 ` David Hildenbrand
  0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2021-12-16 10:59 UTC (permalink / raw)
  To: Anshuman Khandual, linux-mm; +Cc: Andrew Morton, linux-kernel

On 15.12.21 06:17, Anshuman Khandual wrote:
> Just clarify, that the alloc_contig_pages() allocated range will always be
> aligned to the requested nr_pages.
> 
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
>  mm/page_alloc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index c5952749ad40..0d74ea524dd4 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -9214,8 +9214,8 @@ static bool zone_spans_last_pfn(const struct zone *zone,
>   * for allocation requests which can not be fulfilled with the buddy allocator.
>   *
>   * The allocated memory is always aligned to a page boundary. If nr_pages is a
> - * power of two then the alignment is guaranteed to be to the given nr_pages
> - * (e.g. 1GB request would be aligned to 1GB).
> + * power of two, then allocated range is also guaranteed to be aligned to same
> + * nr_pages (e.g. 1GB request would be aligned to 1GB).
>   *
>   * Allocated pages can be freed with free_contig_range() or by manually calling
>   * __free_page() on each allocated page.
> 

To me new vs. old express exactly the same. But it might be an
improvement so I won't object :)

-- 
Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-16 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15  5:17 [PATCH] mm/page_alloc: Modify the comment section for alloc_contig_pages() Anshuman Khandual
2021-12-16 10:59 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox