From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030284AbXDJBjX (ORCPT ); Mon, 9 Apr 2007 21:39:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030293AbXDJBjX (ORCPT ); Mon, 9 Apr 2007 21:39:23 -0400 Received: from fgwmail.fujitsu.co.jp ([164.71.1.133]:38076 "EHLO fgwmail.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030284AbXDJBjV (ORCPT ); Mon, 9 Apr 2007 21:39:21 -0400 X-Greylist: delayed 1041 seconds by postgrey-1.27 at vger.kernel.org; Mon, 09 Apr 2007 21:39:21 EDT Date: Tue, 10 Apr 2007 10:19:00 +0900 Message-ID: <87odlxxbzv.wl%takeuchi_satoru@jp.fujitsu.com> From: Satoru Takeuchi To: Oleg Nesterov Cc: Satoru Takeuchi , Ingo Molnar , Andrew Morton , Mike Galbraith , linux-kernel@vger.kernel.org Subject: Re: [BUG] scheduler: first timeslice of the exiting thread In-Reply-To: <20070409102922.GA216@tv-sign.ru> References: <20070409102922.GA216@tv-sign.ru> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/21.4 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > > b) Doesn't add extra field and have thread's parent the creater, which is > > same as process creation. However it has many side effects, for example, > > we also need to change sys_getppid() implementation. > > can't understand this, sorry. Sorry for my obscure English, perhaps I need more training about writing. What I meant is ... If thread A creates thread B and A's parent is C, B's parent is also C currently. In my idea (b), copy_process() doesn't varies B's parent by CLONE_THREAD flag and B's parent is A. In this case, there is no need to change sched_exit() and doesn't need to add extra field. However, we need to change other code as sysy_getppid(), forget_original_parent(), and so on. It's same as past linux kernel behavior. I don't know the details when and why these code was changed (and this problem was overlooked then). Once I thought I came up with good idea, but now I'm rocking back on my heels because it seems to need many code change. Satoru