2001-11-12 17:52:19

by Mark Peloquin

[permalink] [raw]
Subject: Hardsector size support in 2.4 and 2.5

I was wondering if 2.5 will *really* support different hard sector
sizes. Today the hardsect array in the kernel seems to serve
little purpose. Drivers fill it in, but then what? It does not appear
to be used in any io path computations as illustrated by code
in submit_bh and generic_make_request which use a few
hardcoded shifts by 9 when dealing with sector sizes.

Is the hardsect array on the way *in* or the way *out* of the
kernel? Will 2.5 take the real hardsector value into account?
Or can we expect everything to be handled in 512 byte
multiples (as we do today)?

Thanks.
Mark Peloquin


2001-11-12 18:06:19

by Martin Dalecki

[permalink] [raw]
Subject: Re: Hardsector size support in 2.4 and 2.5

Mark Peloquin wrote:
>
> I was wondering if 2.5 will *really* support different hard sector
> sizes. Today the hardsect array in the kernel seems to serve
> little purpose. Drivers fill it in, but then what? It does not appear
> to be used in any io path computations as illustrated by code
> in submit_bh and generic_make_request which use a few
> hardcoded shifts by 9 when dealing with sector sizes.
>
> Is the hardsect array on the way *in* or the way *out* of the
> kernel? Will 2.5 take the real hardsector value into account?
> Or can we expect everything to be handled in 512 byte
> multiples (as we do today)?

It is on it's way out, since:

1. Most hardware sec sizes are obscelny lower that the minimal logical
sizes those days (512 ver. 4096 page size),
so the tuning there doesn't matter.

2. All of it is "tuning", which can be handled generically on higher
levels. (Like setting FS blocksize....)

3. The hard limits are handled on device driver level anyway (best
example here are the odd fs block sizes for iso9660 filesystem).

2001-11-12 20:05:46

by Mark Peloquin

[permalink] [raw]
Subject: Re: Re: Hardsector size support in 2.4 and 2.5

Martin Dalecki wrote:
> > I was wondering if 2.5 will *really* support different hard sector
> > sizes. Today the hardsect array in the kernel seems to serve
> > little purpose. Drivers fill it in, but then what? It does not appear
> > to be used in any io path computations as illustrated by code
> > in submit_bh and generic_make_request which use a few
> > hardcoded shifts by 9 when dealing with sector sizes.
> >
> > Is the hardsect array on the way *in* or the way *out* of the
> > kernel? Will 2.5 take the real hardsector value into account?
> > Or can we expect everything to be handled in 512 byte
> > multiples (as we do today)?

> It is on it's way out, since:

That is good, then the code should be less confusing.

> 1. Most hardware sec sizes are obscelny lower that the minimal logical
> sizes those days (512 ver. 4096 page size),
> so the tuning there doesn't matter.

> 2. All of it is "tuning", which can be handled generically on higher
> levels. (Like setting FS blocksize....)

> 3. The hard limits are handled on device driver level anyway (best
> example here are the odd fs block sizes for iso9660 filesystem).

So any block device, can always expect to receive buffer heads
whose b_rsector value represents the offset from the beginning
of that device in 512 byte multiples? And this will continue
to hold true in 2.5 as well?

2001-11-12 20:28:19

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [Evms-devel] Re: Re: Hardsector size support in 2.4 and 2.5

On Mon, Nov 12, 2001 at 02:05:19PM -0600, Mark Peloquin wrote:
> So any block device, can always expect to receive buffer heads
> whose b_rsector value represents the offset from the beginning
> of that device in 512 byte multiples? And this will continue
> to hold true in 2.5 as well?

There is a good chance that no 2.5 block driver will ever see a buffer_head,
take a look at http://www.kernel.org/pub/linux/kernel/people/axboe/v2.5/ for
details.

Christoph

--
Of course it doesn't work. We've performed a software upgrade.

2001-11-13 09:03:52

by Jens Axboe

[permalink] [raw]
Subject: Re: [Evms-devel] Re: Re: Hardsector size support in 2.4 and 2.5

On Mon, Nov 12 2001, Christoph Hellwig wrote:
> On Mon, Nov 12, 2001 at 02:05:19PM -0600, Mark Peloquin wrote:
> > So any block device, can always expect to receive buffer heads
> > whose b_rsector value represents the offset from the beginning
> > of that device in 512 byte multiples? And this will continue
> > to hold true in 2.5 as well?
>
> There is a good chance that no 2.5 block driver will ever see a buffer_head,
> take a look at http://www.kernel.org/pub/linux/kernel/people/axboe/v2.5/ for
> details.

To expand on the specific point -- in 2.5, what will change is that
b_rsector (or equiv field, bi_sector in bio) will be offset from the
beginning of the disk, not the beginning of the partition. This moves
toe partion remaps out of the driver itself.

--
Jens Axboe