[lkml]   [2002]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: fadvise syscall?
>>>>> "Eric" == Eric W Biederman <> writes:

>> In the end, cloning the kiobuf from the above and adjusting
>> offset/length in the children turned out to be the best approach.

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

Well. We have several places in the I/O path already where we need to
allocate memory in order to fulfill an I/O.

Think RAID1 where you need to turn one request from the filesystem
into several - one for each mirror. Or RAID5 where a write may cause
several reads/writes so you can mask and write the checksum out.

Also, with journaling filesystems you may very well be in a situation
where pushing a file to disk involves writing transactions to the log
before you can actually free up buffers.

In this case the clones come from the bio slab cache and are thus no
different from any other I/Os. Furthermore, the clones share the bulk
of their data with the parent, so the overhead isn't that big.

Martin K. Petersen, Principal Linux Consultant, Linuxcare, Inc.,
SGI XFS for Linux Developer,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:25    [W:0.074 / U:7.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site