Re: [RFC] on general object IDs again

From: Eric W. Biederman
Date: Wed Jan 11 2012 - 15:42:52 EST


Cyrill Gorcunov <gorcunov@xxxxxxxxx> writes:

> On Thu, Jan 12, 2012 at 12:24:33AM +0400, Pavel Emelyanov wrote:
>> > In the second place the only reason why we would need O(N^2) complexity
>> > instead of O(NlogN) is if the comparison system call only compares for
>> > identity instead of returning a result that allows us to order the
>> > objects we are worrying about.
>>
>> Hm... I like this one. As I said we'd have to do the sorting anyway so
>> having the less-equals-above comparator right in the kernel sounds OK.
>>
>
> So it would look something like
>
> sys_cmp_kid(pid1, pid2, kid-type)
>
> (where kid is kernel-id), right ? Or I miss something ?

Pretty much.

For those objects you can have more than one of like file descriptors we
may want more parameters, or perhaps a family of syscalls.

We also probably don't want to want to talk about ids. Because we
aren't comparing ids, we are in principle comparing the objects
themselves and returning an arbitrary ordering.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/