Re: fadvise syscall?

Eric W. Biederman (ebiederm@xmission.com)
19 Mar 2002 13:08:48 -0700


"Martin K. Petersen" <mkp@mkp.net> writes:

> >>>>> "Andrew" == Andrew Morton <akpm@zip.com.au> writes:
>
> Andrew> If that's really the only way in which we can solve this
> Andrew> problem, would it not be better to pass information up to the
> Andrew> higher layer, telling it when the BIO which is currently under
> Andrew> assembly cannot be grown further? Say,
> Andrew> blk_can_i_add_more_stuff_to_this_bio()?

Please let's extend BIOs and not break them up.

> We tried different approaches. One of them was to be able to signal
> to upper layers that your I/O was too big and please submit smaller
> chunks. Running with that, however, the I/O size converged against
> small requests because you'd often start an I/O - say 4K - from a
> stripe boundary. And that would kill it right off.
>
> So unless the filesystem knows about stripe/device boundaries it's
> really hard to get the size signalling right. And then what happens
> when you stack LVM and MD?
>
> In the end, cloning the kiobuf from the above and adjusting
> offset/length in the children turned out to be the best approach.

Unless I am mistaken this interacts very badly with the writing data
out to disk to free up memory, because you must allocate memory to
split the bio. Which is the last place you want to allocate memory
if you can avoid it.

It's been a while but I believe there was a similiar thread about
splitting request to disk and the idea was shot down for similiar
reasons.

Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/