Re: fadvise syscall?

Eric W. Biederman
2002-03-19T20:20:09Z

"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