mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <christoph@lameter.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: linux-kernel@vger.kernel.org,
	Mitchell Blank Jr <mitch@sfgoth.com>,
	Andrew Morton <akpm@osdl.org>,
	shai@scalex86.org
Subject: Re: [PATCH] Optimize sys_times for a single thread process
Date: Thu, 19 May 2005 07:41:41 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.62.0505190737500.28714@graphe.net> (raw)
In-Reply-To: <428C3ABB.61B552E@tv-sign.ru>

On Thu, 19 May 2005, Oleg Nesterov wrote:

> > The thread ist needs to contain only one element which is current.
> > thread_group_empty checks for no threads.
> 
> I think that thread_group_empty() means that there are no *other*
> threads in the thread group, that means that we have only one thread.
> 
> In any case (p == next_thread(p)) == thread_group_empty(p).
> 
> But it is a very minor issue indeed, let's forget it.

No no. If you are right then you are right and I am 
wrong.

Index: linux-2.6.12-rc4/kernel/sys.c
===================================================================
--- linux-2.6.12-rc4.orig/kernel/sys.c	2005-05-19 03:23:29.000000000 +0000
+++ linux-2.6.12-rc4/kernel/sys.c	2005-05-19 14:40:32.000000000 +0000
@@ -920,7 +920,7 @@
 		cputime_t utime, stime, cutime, cstime;
 
 #ifdef CONFIG_SMP
-		if (current == next_thread(current)) {
+		if (thread_group_empty(current)) {
 			/*
 			 * Single thread case without the use of any locks.
 			 *

  reply	other threads:[~2005-05-19 14:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18  9:23 Oleg Nesterov
2005-05-18 22:05 ` Christoph Lameter
2005-05-19  7:05   ` Oleg Nesterov
2005-05-19 14:41     ` Christoph Lameter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-05-17 22:37 Christoph Lameter
2005-05-17 23:10 ` Andrew Morton
2005-05-18  0:13   ` Christoph Lameter
2005-05-18  0:20     ` Andrew Morton
2005-05-18  1:03 ` Mitchell Blank Jr
2005-05-18  1:00   ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.62.0505190737500.28714@graphe.net \
    --to=christoph@lameter.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitch@sfgoth.com \
    --cc=oleg@tv-sign.ru \
    --cc=shai@scalex86.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®