[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <42169da4-f453-af92-1c1e-76e65346c4af@oracle.com>
Date: Fri, 21 Apr 2023 22:10:39 -0700
From: Jane Chu <jane.chu@...cle.com>
To: Luis Chamberlain <mcgrof@...nel.org>, hughd@...gle.com,
akpm@...ux-foundation.org, willy@...radead.org, brauner@...nel.org,
djwong@...nel.org
Cc: p.raghav@...sung.com, da.gomez@...sung.com,
a.manzanares@...sung.com, dave@...olabs.net, yosryahmed@...gle.com,
keescook@...omium.org, hare@...e.de, kbusch@...nel.org,
patches@...ts.linux.dev, linux-block@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC 8/8] shmem: add support to customize block size on multiple
PAGE_SIZE
On 4/21/2023 2:44 PM, Luis Chamberlain wrote:
[..]
> + /*
> + * We cap this to allow a block to be at least allowed to
> + * be allocated using the buddy allocator. That's MAX_ORDER
> + * pages. So 4 MiB on x86_64.
8 MiB? since MAX_ORDER is 11.
> + */
> + if (ctx->blocksize > (1 << (MAX_ORDER + PAGE_SHIFT)))
> + goto bad_value; > +
> + /* The blocksize must be a multiple of the page size so must be aligned */
> + if (!PAGE_ALIGNED(ctx->blocksize))
> + goto bad_value;
> + break;
> }
> return 0;
-jane
Powered by blists - more mailing lists