Hi!
On 00:01 Sat 11 Oct , Peter Teoh wrote:
> thank you Michael,
>
> As far as I can tell, it is related to I/O scheduling. Still don't
> quite understand, why CFQ and anticipatory will need this IO context,
> and the other two it does not matter?
> > On 10:50 Thu 09 Oct , Peter Teoh wrote:
> >> What is CLONE_IO used for? What is the definition / meaning of I/O
> >> context sharing between parent and child?
> >>
> >> In fact, from header file:
> >>
> >> #define CLONE_FS 0x00000200 /* set if fs info shared
> >> between processes */
> >> #define CLONE_FILES 0x00000400 /* set if open files shared
> >> between processes */
> >> #define CLONE_IO 0x80000000 /* Clone io context */
> >>
> >> These three looked seemingly the same/related.....differences among them?
CLONE_FS:
thread 1 does chroot, chdir or umask ==> does it affect the other thread?
CLONE_FILES:
thread 1 calls open or close ==> does the other thread see the new file
descriptor and does it see the old file descriptor closed?
CLONE_IO:
CFQ or some other io scheduler which lets every process have their fair
share of IO time is in use. Thread 1 and a new thread created by clone()
do a lot of io. If CLONE_IO is set, their fair share io bandwidth will
equals the bandwidth a single process would get. If it is *not* set, both
threads will have their own fair share, meaning the fair share will grow
if the number of threads increases.
-Michi
--
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ