linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Minchan Kim <minchan@kernel.org>, Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: change size_t to unsigned int for cma_alloc
Date: Tue, 30 Mar 2021 09:58:37 +0200	[thread overview]
Message-ID: <6d305211-c956-ad80-5908-703d07fca441@redhat.com> (raw)
In-Reply-To: <YGI0sThJjsshpPIR@google.com>

On 29.03.21 22:12, Minchan Kim wrote:
> On Mon, Mar 29, 2021 at 07:44:31PM +0100, Matthew Wilcox wrote:
>> On Mon, Mar 29, 2021 at 11:25:53AM -0700, Minchan Kim wrote:
>>> size_t in cma_alloc is confusing since it makes people think
>>> it's byte count, not pages. Fix it.
>>
>> i think it has to be unsigned long.
>>
>> 67a2e213e7e937c41c52ab5bc46bf3f4de469f6e

Right.

Fortunately, we don't have such large allocations yet via 
CMA/alloc_contig_range

> 
> Thanks for the pinter. I wanted to have the smallest change.
> The commit leads me to change cma_release, trace_cma_alloc,
> cma_clear_bitmap and front_contig_range as well.(Not sure
> we have more. Will check).
> 
> Ccing david@redhat.com for upcoming changing free_contig_range.

While at it, we might want to convert free_contig_range() to eat
"unsigned long start, unsigned long end" like alloc_contig_range(), 
instead of "unsigned long pfn, unsigned int nr_pages" like 
alloc_contig_pages() ...

-- 
Thanks,

David / dhildenb


  reply	other threads:[~2021-03-30  7:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 18:25 [PATCH] mm: change size_t to unsigned int for cma_alloc Minchan Kim
2021-03-29 18:44 ` Matthew Wilcox
2021-03-29 20:12   ` Minchan Kim
2021-03-30  7:58     ` David Hildenbrand [this message]
2021-03-30 15:00       ` Minchan Kim
2021-03-30 15:05         ` David Hildenbrand

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=6d305211-c956-ad80-5908-703d07fca441@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).