public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [1/1] Export __lock_page_killable()
@ 2008-05-14 14:11 Evgeniy Polyakov
  2008-05-14 14:13 ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Evgeniy Polyakov @ 2008-05-14 14:11 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Hi.

There are users, who would like to use lock_page_killable() in modules,
so far there are no users in kernel, but for consistency it can be
exported without them.

Not that it is particulary needed, but copying page_waitqueue() in
modules is frowned upon and unlikely to be exported either.

As a side note, do we want interruptible and time limited locking for
those who knows what is being done?

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

diff --git a/mm/filemap.c b/mm/filemap.c
index 07e9d92..0a4fea5 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -610,6 +610,7 @@ int __lock_page_killable(struct page *page)
 	return __wait_on_bit_lock(page_waitqueue(page), &wait,
 					sync_page_killable, TASK_KILLABLE);
 }
+EXPORT_SYMBOL(__lock_page_killable);
 
 /**
  * __lock_page_nosync - get a lock on the page, without calling sync_page()


-- 
	Evgeniy Polyakov

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

* Re: [1/1] Export __lock_page_killable()
  2008-05-14 14:11 [1/1] Export __lock_page_killable() Evgeniy Polyakov
@ 2008-05-14 14:13 ` Alan Cox
  2008-05-14 14:32   ` Evgeniy Polyakov
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2008-05-14 14:13 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: Andrew Morton, linux-kernel

On Wed, 14 May 2008 18:11:58 +0400
Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:

> Hi.
> 
> There are users, who would like to use lock_page_killable() in modules,
> so far there are no users in kernel, but for consistency it can be
> exported without them.

Missing information #1: Who are the users and what are the URLs to the
code in question

> Not that it is particulary needed

Humm..

> +EXPORT_SYMBOL(__lock_page_killable);

_GPL - or better yet this could be added *when* we have an actual in tree
user who really needs it and can show it is appropriate to export.
That'll also save Adrian from removing it again ;)

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

* Re: [1/1] Export __lock_page_killable()
  2008-05-14 14:13 ` Alan Cox
@ 2008-05-14 14:32   ` Evgeniy Polyakov
  2008-05-14 18:04     ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Evgeniy Polyakov @ 2008-05-14 14:32 UTC (permalink / raw)
  To: Alan Cox; +Cc: Andrew Morton, linux-kernel

Hi Alan.

On Wed, May 14, 2008 at 03:13:56PM +0100, Alan Cox (alan@lxorguk.ukuu.org.uk) wrote:
> > There are users, who would like to use lock_page_killable() in modules,
> > so far there are no users in kernel, but for consistency it can be
> > exported without them.
> 
> Missing information #1: Who are the users and what are the URLs to the
> code in question

POHMELFS wants to use that in two places: one to lock page in writeback,
another one is about second part of the message - it waits for timeout
or signal or locks the page. If page can not be locked, it performs own
steps, not sleeps forever...

POHMELFS is a high performance network filesystem, homepage for interested
reader:
http://tservice.net.ru/~s0mbre/old/?section=projects&item=pohmelfs
or yesterdays mail to mail lists:
http://lwn.net/Articles/282010/

> > Not that it is particulary needed
> 
> Humm..

I copied page_waitqueue() and use wait_on_bit() logic myself.
Andrew choked with his breakfast when saw that.

> > +EXPORT_SYMBOL(__lock_page_killable);
> 
> _GPL - or better yet this could be added *when* we have an actual in tree
> user who really needs it and can show it is appropriate to export.
> That'll also save Adrian from removing it again ;)

No problem wiht GPL-only exporting, but carring it over the whole
release means no ability to build out-of-tree module.

Actually what I want to hear, is that it is needed or not at all...

-- 
	Evgeniy Polyakov

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

* Re: [1/1] Export __lock_page_killable()
  2008-05-14 14:32   ` Evgeniy Polyakov
@ 2008-05-14 18:04     ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2008-05-14 18:04 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: Alan Cox, linux-kernel

On Wed, 14 May 2008 18:32:15 +0400 Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:

> Actually what I want to hear, is that it is needed or not at all...

Yes, I think it's a reasonable thing to export.  We could do it
now as part of a "make the API complete" exercise but more typically
we'd do it when merging code which needs that export.

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

end of thread, other threads:[~2008-05-14 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-14 14:11 [1/1] Export __lock_page_killable() Evgeniy Polyakov
2008-05-14 14:13 ` Alan Cox
2008-05-14 14:32   ` Evgeniy Polyakov
2008-05-14 18:04     ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox