mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@user.it.uu.se>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH][2.6.10-mm3] remove bogus perfctr_sample_thread() calls
Date: Wed, 12 Jan 2005 12:41:28 +0100	[thread overview]
Message-ID: <16869.3304.862072.953606@alkaid.it.uu.se> (raw)

Andrew,

2.6.10-mm3 added perfctr_sample_thread() calls in
account_{user,system}_time(). I believe these to be bogus:

1. When they are called from update_process_times(), there
   will be two perfctr_sample_thread()s per tick, one of
   which is redundant.
2. s390's weird timer tick code calls both account_{user,system}_time()
   directly, bypassing update_process_times(). In this case there
   also be two perfctr_sample_thread()s per tick.

I believe the proper fix is to remove the new calls and, should
s390 ever get perfctr support, add _one_ perfctr_sample_thread()
call in s390's account_user_vtime().

The patch below removes the extraneous calls. Please apply.

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>

--- linux-2.6.10-mm3/kernel/sched.c.~1~	2005-01-11 23:35:18.000000000 +0100
+++ linux-2.6.10-mm3/kernel/sched.c	2005-01-12 00:28:58.000000000 +0100
@@ -2334,7 +2334,6 @@ void account_user_time(struct task_struc
 	check_rlimit(p, cputime);
 	account_it_virt(p, cputime);
 	account_it_prof(p, cputime);
-	perfctr_sample_thread(&p->thread);
 
 	/* Add user time to cpustat. */
 	tmp = cputime_to_cputime64(cputime);
@@ -2365,8 +2364,6 @@ void account_system_time(struct task_str
 		account_it_prof(p, cputime);
 	}
 
-	perfctr_sample_thread(&p->thread);
-
 	/* Add system time to cpustat. */
 	tmp = cputime_to_cputime64(cputime);
 	if (hardirq_count() - hardirq_offset)

                 reply	other threads:[~2005-01-12 11:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=16869.3304.862072.953606@alkaid.it.uu.se \
    --to=mikpe@user.it.uu.se \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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®