Re: fadvise syscall?

Martin K. Petersen (mkp@mkp.net)
19 Mar 2002 18:38:31 -0500


>>>>> "Eric" == Eric W Biederman <ebiederm@xmission.com> 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.
mkp@linuxcare.com, http://www.linuxcare.com/
SGI XFS for Linux Developer, http://oss.sgi.com/projects/xfs/

- 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/