[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting behavior for clustered IO

From: Maksym Planeta
Subject: Setting behavior for clustered IO
Date: Mon, 02 Apr 2012 00:23:03 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)


I want to work upon implementing of clustered page reading in GNU/Mach,
as GSoC project. The goal of this project is not only add ability of
reading more than one page when page fault occurs, but also implement
appropriate interface for user to give him ability to configure behavior
at page faults. Usual way for this in POSIX-compatible operating systems
is using of function madvise.

This function allows user advise the kernel about how to handle paging
input/output in specified memory range. There are several behaviors,
fault handler's point of view these behaviors differ only in size of
memory chunk that will be read ahead.

The project I suppose to work on is not new for GSoC. Two years ago a
student, whose nick on irc channel is kam, tried to implement readahead,
but didn't manage to do that for some reason. I looked through patch he
has sent and there he appended function vm_behavior_set for setting
behavior of page fault handler. As parameter, this function  accepts
constant, that specifies behavior in way that is similar to the way is
implemented in madvise.

But I think, that if difference between behavior lies only in size of
chunk to be read it will be more flexible to accept as parameter of
vm_behavior_set not constant, that represents behavior, but size of
chunk. And madvise implementation in library will convert behavior name
to size of chunk (and for sure do other work). This will allow do more
work in user space and add to kernel less modifications.

Also kam takes into account the direction of reading for sequential
behavior, but I doubt if this really needed, because it seems to be
unusual way of reading. Additionally madvise doesn't have appropriate
parameters which could be used to inform kernel about direction of

Am I right or is it better to do like kam was doing?

Maksym Planeta.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]