Subject: Re: Changing the I/O scheduler on-the-fly
To: Juan RP <juan@xtrarom.org>
From: Brett Lymn <blymn@baesystems.com.au>
List: tech-kern
Date: 09/08/2005 19:53:31
On Thu, Sep 08, 2005 at 01:08:01AM +0200, Juan RP wrote:
> >
> > - IMO, this kernel-userland interface should be by-name rather than
> > by-bits.
>
> cube told me the same hours ago, I don't know why yet...
>
I can think of a couple of reasons:
1) it decouples the kernel version from the userland version somewhat
if you use bits then you need to maintain strict order for any
updates otherwise an old userland may set something totally
different in a new kernel because number 2 for the userland app
means something entirely different to number 2 in kernel land.
This may not sound so bad initially but read on...
2) it means you can dynamically add more methods to the list to use
(maybe using a dynamically loaded kernel module) and then reference
the new method from the userland without the need to do anything to
the userland code. You could work around this by allocating magic
numbers for methods but then a user would need to know the magic
number or always have an up-to-date userland.
Passing in name references avoids a lot of complications... I fell
down this hole myself with verified exec, after a while I came to
realise that passing magic numbers between userland and kernel is not
always a good thing to do.
--
Brett Lymn