lkml.org 
[lkml]   [2021]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git pull] work.misc
On Sun, May 02, 2021 at 09:26:26AM -0700, Linus Torvalds wrote:
> On Sat, May 1, 2021 at 6:30 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > Mikulas Patocka (1):
> > buffer: a small optimization in grow_buffers
>
> Side note: if that optimization actually matters (which I doubt), we
> could just make getblk and friends take s_blocksize_bits instead of
> the block size. And avoid the whole "find first bit" thing.
>
> As it is, we end up doing odd and broken things if anybody were to
> ever use a non-power-of-2 blocksize (we check that it's a multiple of
> the hw blocksize, we check that it's between 512 and PAGE_SIZE, but we
> don't seem to check that it's a power-of-2).

I think we have checks that the hw blocksize is a power-of-two (maybe
just in SCSI? see sd_read_capacity())

I don't see much demand in the storage industry for non-power-of-two
sizes; I was once asked about a 12kB sector size at Intel, but when I
said "no", they didn't seem surprised. I see interest in going smaller
(cacheline sized) for pmem and I see interest in going larger (16kB
sector sizes) for NAND.

\
 
 \ /
  Last update: 2021-05-02 20:01    [W:0.070 / U:4.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site