All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] swait: export the symbols __prepare_to_swait and __finish_swait
@ 2017-11-23  2:35 Mikulas Patocka
  2017-11-23  8:28 ` [dm-devel] " Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Mikulas Patocka @ 2017-11-23  2:35 UTC (permalink / raw)
  To: dm-devel, Mike Snitzer

In order to reduce locking overhead, I use the spinlock in
swait_queue_head to protect not only the wait queue, but also the list of
events. Consequently, I need to use unlocked functions __prepare_to_swait
and __finish_swait. These functions are declared in the file
include/linux/swait.h, but they are not exported, and so they are not
useable from kernel modules.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
 kernel/sched/swait.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/kernel/sched/swait.c
===================================================================
--- linux-2.6.orig/kernel/sched/swait.c
+++ linux-2.6/kernel/sched/swait.c
@@ -73,6 +73,7 @@ void __prepare_to_swait(struct swait_que
 	if (list_empty(&wait->task_list))
 		list_add(&wait->task_list, &q->task_list);
 }
+EXPORT_SYMBOL(__prepare_to_swait);
 
 void prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait, int state)
 {
@@ -102,6 +103,7 @@ void __finish_swait(struct swait_queue_h
 	if (!list_empty(&wait->task_list))
 		list_del_init(&wait->task_list);
 }
+EXPORT_SYMBOL(__finish_swait);
 
 void finish_swait(struct swait_queue_head *q, struct swait_queue *wait)
 {

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-18 21:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-23  2:35 [PATCH 1/2] swait: export the symbols __prepare_to_swait and __finish_swait Mikulas Patocka
2017-11-23  8:28 ` [dm-devel] " Christoph Hellwig
2017-11-23 22:27   ` Mikulas Patocka
2018-05-18 21:03     ` Mike Snitzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.