mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, stable@kernel.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 1/2] x86: Rename __task_delta_exec() to task_delta_exec_locked()
Date: Mon, 23 Mar 2009 14:11:49 +0900	[thread overview]
Message-ID: <49C71A15.5030300@jp.fujitsu.com> (raw)
In-Reply-To: <20090318113430.GD32233@elte.hu>

Externing function with prefix "__" is unpleasant.
This patch renames the function and fix the caller.
This change is desirable for other fix that against posix clocks,
since the fix introduces another __task_delta_exec() which is static.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
 include/linux/kernel_stat.h |    2 +-
 kernel/perf_counter.c       |    6 +++---
 kernel/sched.c              |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index b6d2887..459bc1e 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -87,7 +87,7 @@ static inline unsigned int kstat_irqs(unsigned int irq)
  */
 extern void curr_rq_lock_irq_save(unsigned long *flags);
 extern void curr_rq_unlock_irq_restore(unsigned long *flags);
-extern unsigned long long __task_delta_exec(struct task_struct *tsk, int update);
+extern unsigned long long task_delta_exec_locked(struct task_struct *tsk, int update);
 extern unsigned long long task_delta_exec(struct task_struct *);
 
 extern void account_user_time(struct task_struct *, cputime_t, cputime_t);
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index f054b8c..66ddb2f 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -881,7 +881,7 @@ int perf_counter_task_disable(void)
 	cpu = smp_processor_id();
 
 	/* force the update of the task clock: */
-	__task_delta_exec(curr, 1);
+	task_delta_exec_locked(curr, 1);
 
 	perf_counter_task_sched_out(curr, cpu);
 
@@ -922,7 +922,7 @@ int perf_counter_task_enable(void)
 	cpu = smp_processor_id();
 
 	/* force the update of the task clock: */
-	__task_delta_exec(curr, 1);
+	task_delta_exec_locked(curr, 1);
 
 	perf_counter_task_sched_out(curr, cpu);
 
@@ -1635,7 +1635,7 @@ static u64 task_clock_perf_counter_val(struct perf_counter *counter, int update)
 	struct task_struct *curr = counter->task;
 	u64 delta;
 
-	delta = __task_delta_exec(curr, update);
+	delta = task_delta_exec_locked(curr, update);
 
 	return curr->se.sum_exec_runtime + delta;
 }
diff --git a/kernel/sched.c b/kernel/sched.c
index 3e827b8..5ee5a06 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4304,10 +4304,10 @@ DEFINE_PER_CPU(struct kernel_stat, kstat);
 EXPORT_PER_CPU_SYMBOL(kstat);
 
 /*
- * Return any ns on the sched_clock that have not yet been banked in
- * @p in case that task is currently running.
+ * Return any ns on the sched_clock that have not yet been accounted.
+ * @p must be a task currently running.
  */
-unsigned long long __task_delta_exec(struct task_struct *p, int update)
+unsigned long long task_delta_exec_locked(struct task_struct *p, int update)
 {
 	s64 delta_exec;
 	struct rq *rq;
-- 
1.6.2.1



  parent reply	other threads:[~2009-03-23  5:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17  6:13 [PATCH] posixtimers: Fix posix clock monotonicity Hidetoshi Seto
2009-03-17  6:16 ` KAMEZAWA Hiroyuki
2009-03-17  6:31   ` Hidetoshi Seto
2009-03-18 10:41 ` [PATCH] posixtimers: Fix posix clock monotonicity v2 Hidetoshi Seto
2009-03-18 10:58   ` Peter Zijlstra
2009-03-18 11:34   ` Ingo Molnar
2009-03-23  5:07     ` Hidetoshi Seto
2009-03-23  5:11     ` Hidetoshi Seto [this message]
2009-03-23  7:57       ` [PATCH 1/2] x86: Rename __task_delta_exec() to task_delta_exec_locked() Peter Zijlstra
2009-03-23  9:13         ` Hidetoshi Seto
2009-03-23  9:40           ` [PATCH] posixtimers: Fix posix clock monotonicity v3 Hidetoshi Seto
2009-03-23  9:42             ` Peter Zijlstra
2009-03-23  5:13     ` [PATCH 2/2] posixtimers: Fix posix clock monotonicity v2 Hidetoshi Seto

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=49C71A15.5030300@jp.fujitsu.com \
    --to=seto.hidetoshi@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=stable@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

Powered by JetHome