From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758056Ab2AKUeb (ORCPT ); Wed, 11 Jan 2012 15:34:31 -0500 Received: from mail-bk0-f46.google.com ([209.85.214.46]:51628 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176Ab2AKUe3 (ORCPT ); Wed, 11 Jan 2012 15:34:29 -0500 Date: Thu, 12 Jan 2012 00:34:23 +0400 From: Cyrill Gorcunov To: Pavel Emelyanov Cc: "Eric W. Biederman" , KOSAKI Motohiro , LKML , Andrew Morton , Kyle Moffett , Tejun Heo , Glauber Costa , Andi Kleen , Matt Helsley , Pekka Enberg , Eric Dumazet , Vasiliy Kulikov , Alexey Dobriyan , Herbert Xu , "David S. Miller" , Andrey Vagin Subject: Re: [RFC] on general object IDs again Message-ID: <20120111203423.GD28196@moon> References: <20120111161939.GI8752@moon> <20120111175952.GI466@moon> <4F0DD365.6070200@parallels.com> <20120111183115.GA28196@moon> <4F0DF001.6090903@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F0DF001.6090903@parallels.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? Cyrill