From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754842AbZIKRAo (ORCPT ); Fri, 11 Sep 2009 13:00:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754827AbZIKRAk (ORCPT ); Fri, 11 Sep 2009 13:00:40 -0400 Received: from casper.infradead.org ([85.118.1.10]:55900 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754808AbZIKRAi (ORCPT ); Fri, 11 Sep 2009 13:00:38 -0400 Subject: Re: [RFC][v6][PATCH 0/9] clone_with_pids() syscall From: Peter Zijlstra To: Sukadev Bhattiprolu Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Oren Laadan , "Eric W. Biederman" , Alexey Dobriyan , Pavel Emelyanov , Andrew Morton , torvalds@linux-foundation.org, mikew@google.com, mingo@elte.hu, hpa@zytor.com, Nathan Lynch , container@us.ibm.com, sukadev@us.ibm.com In-Reply-To: <20090911164703.GA29169@us.ibm.com> References: <20090910060627.GA24343@us.ibm.com> <1252668148.7126.13.camel@laptop> <200909111334.45241.arnd@arndb.de> <20090911164703.GA29169@us.ibm.com> Content-Type: text/plain Date: Fri, 11 Sep 2009 19:00:04 +0200 Message-Id: <1252688404.7126.40.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2009-09-11 at 09:47 -0700, Sukadev Bhattiprolu wrote: > | Also, if you're passing a struct, why not put nr_pids in there, and > | replace clone_pid_struct with a simple array? That would give us > | > | struct clone_struct { > | u64 flags; > | u64 child_stack; > | u32 child_tid; > | u32 parent_tid; > | u32 nr_pids; > | u32 reserved1; > | u64 reserved2; > | }; > | > | int clone2(struct clone_struct *cs, pid_t *pids); > > My only concern with this approach was the extra copy_from_user() in the > common case (i.e when not using the extended features). I assume the > overhead of copy_from_user() is small enough to be ignored ? I would think so, esp for small structure, it would be a cache hot copy. That is, for x86 I doubt it'll show up. No idea what hoops other arch have to jump through to get copy_from_user() doing what it does.