From: Dennis Zhou <dennis@kernel.org>
To: Peng Fan <peng.fan@nxp.com>
Cc: "tj@kernel.org" <tj@kernel.org>, "cl@linux.com" <cl@linux.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"van.freenix@gmail.com" <van.freenix@gmail.com>
Subject: Re: [PATCH 1/2] perpcu: correct pcpu_find_block_fit comments
Date: Mon, 4 Mar 2019 14:13:44 -0500 [thread overview]
Message-ID: <20190304191344.GB17970@dennisz-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20190304104541.25745-1-peng.fan@nxp.com>
On Mon, Mar 04, 2019 at 10:33:52AM +0000, Peng Fan wrote:
> pcpu_find_block_fit is not find block index, it is to find
> the bitmap off in a chunk.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>
> V1:
> Based on https://patchwork.kernel.org/cover/10832459/ applied linux-next
>
> mm/percpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/percpu.c b/mm/percpu.c
> index 7f630d5469e8..5ee90fc34ea3 100644
> --- a/mm/percpu.c
> +++ b/mm/percpu.c
> @@ -1061,7 +1061,7 @@ static bool pcpu_is_populated(struct pcpu_chunk *chunk, int bit_off, int bits,
> }
>
> /**
> - * pcpu_find_block_fit - finds the block index to start searching
> + * pcpu_find_block_fit - finds the offset in chunk bitmap to start searching
> * @chunk: chunk of interest
> * @alloc_bits: size of request in allocation units
> * @align: alignment of area (max PAGE_SIZE bytes)
> --
> 2.16.4
>
So really the block index is encoded in the bit offset. I'm not super
happy with either wording because the point of the function really is to
find a block(s) that can support this allocation and it happens the
output is a chunk offset.
Thanks,
Dennis
next prev parent reply other threads:[~2019-03-04 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 10:33 Peng Fan
2019-03-04 10:33 ` [PATCH 2/2] percpu: pcpu_next_md_free_region: inclusive check for PCPU_BITMAP_BLOCK_BITS Peng Fan
2019-03-04 18:56 ` dennis
2019-03-05 1:31 ` Peng Fan
2019-03-04 19:13 ` Dennis Zhou [this message]
2019-03-05 1:49 ` [PATCH 1/2] perpcu: correct pcpu_find_block_fit comments Peng Fan
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=20190304191344.GB17970@dennisz-mbp.dhcp.thefacebook.com \
--to=dennis@kernel.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peng.fan@nxp.com \
--cc=tj@kernel.org \
--cc=van.freenix@gmail.com \
/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