- mark-rwsem-functions-as-__sched-for-wchan-profiling.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Mark rwsem functions as __sched for wchan/profiling
has been removed from the -mm tree.  Its filename was
     mark-rwsem-functions-as-__sched-for-wchan-profiling.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: Mark rwsem functions as __sched for wchan/profiling
From: Livio Soares <livio@xxxxxxxxxxxxxxxx>

This following commit

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fdf8cb0909b531f9ae8f9b9d7e4eb35ba3505f07

un-inlined a low-level rwsem function, but did not mark it as __sched.  The
result is that it now shows up as thread wchan (which also affects
/proc/profile stats).  The following simple patch fixes this by properly
marking rwsem_down_failed_common() as a __sched function.

Also in this patch, which is up for discussion, marks down_read() and
down_write() proper as __sched.  For profiling, it is pretty much useless
to know that a semaphore is beig help - it is necessary to know _which_
one.  By going up another frame on the stack, the information becomes much
more useful.

In summary, the below change to lib/rwsem.c should be applied; the changes
to kernel/rwsem.c could be applied if other kernel hackers agree with my
proposal that down_read()/down_write() in the profile is not enough.

Signed-off-by: Livio Soares <livio@xxxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/rwsem.c |    4 ++--
 lib/rwsem.c    |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -puN kernel/rwsem.c~mark-rwsem-functions-as-__sched-for-wchan-profiling kernel/rwsem.c
--- a/kernel/rwsem.c~mark-rwsem-functions-as-__sched-for-wchan-profiling
+++ a/kernel/rwsem.c
@@ -15,7 +15,7 @@
 /*
  * lock for reading
  */
-void down_read(struct rw_semaphore *sem)
+void __sched down_read(struct rw_semaphore *sem)
 {
 	might_sleep();
 	rwsem_acquire_read(&sem->dep_map, 0, 0, _RET_IP_);
@@ -42,7 +42,7 @@ EXPORT_SYMBOL(down_read_trylock);
 /*
  * lock for writing
  */
-void down_write(struct rw_semaphore *sem)
+void __sched down_write(struct rw_semaphore *sem)
 {
 	might_sleep();
 	rwsem_acquire(&sem->dep_map, 0, 0, _RET_IP_);
diff -puN lib/rwsem.c~mark-rwsem-functions-as-__sched-for-wchan-profiling lib/rwsem.c
--- a/lib/rwsem.c~mark-rwsem-functions-as-__sched-for-wchan-profiling
+++ a/lib/rwsem.c
@@ -146,7 +146,7 @@ __rwsem_do_wake(struct rw_semaphore *sem
 /*
  * wait for a lock to be granted
  */
-static struct rw_semaphore *
+static struct rw_semaphore __sched *
 rwsem_down_failed_common(struct rw_semaphore *sem,
 			struct rwsem_waiter *waiter, signed long adjustment)
 {
_

Patches currently in -mm which might be from livio@xxxxxxxxxxxxxxxx are

origin.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux