From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbdKWI3H (ORCPT ); Thu, 23 Nov 2017 03:29:07 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:54693 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751468AbdKWI3F (ORCPT ); Thu, 23 Nov 2017 03:29:05 -0500 Date: Thu, 23 Nov 2017 00:28:57 -0800 From: Christoph Hellwig To: Mikulas Patocka Cc: dm-devel@redhat.com, Mike Snitzer , Daniel Wagner , Thomas Gleixner , Peter Zijlstra , linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [dm-devel] [PATCH 1/2] swait: export the symbols __prepare_to_swait and __finish_swait Message-ID: <20171123082857.GA17859@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Please run this past the swait authors. It is supposed to be a simple and self-contained API so I'd expect this patch to be seen critical. You might be better off to just use the normal complex waitqueues if you want to micro-optimize like this. On Wed, Nov 22, 2017 at 09:35:36PM -0500, Mikulas Patocka wrote: > 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 > > --- > 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) > { > > -- > dm-devel mailing list > dm-devel@redhat.com > https://www.redhat.com/mailman/listinfo/dm-devel ---end quoted text---