lkml.org 
[lkml]   [2009]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][v6][PATCH 0/9] clone_with_pids() syscall
Peter Zijlstra [peterz@infradead.org] wrote:
| 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;

BTW, these two tids are __user pointers that kernel copies data into.
They should be u64 to avoid conversions in architecture specific code ?

| > | 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.


\
 
 \ /
  Last update: 2009-09-12 19:17    [W:0.230 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site