* lock_page/LockPage/UnlockPage
@ 2000-04-10 23:41 Jim Mostek
2000-04-11 12:47 ` lock_page/LockPage/UnlockPage Andrea Arcangeli
0 siblings, 1 reply; 2+ messages in thread
From: Jim Mostek @ 2000-04-10 23:41 UTC (permalink / raw)
To: linux-mm
Just a minor nit, but it seems to me that if UnlockPage wakes up
sleepers, LockPage should go to sleep.
The interface:
LockPage
UnlockPage
TryLockPage(page)
should all be bit operators and then:
lock_page
unlock_page
trylock_page
should be the ones that actually sleep/wakeup.
Not a big deal, but ....
Jim
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: lock_page/LockPage/UnlockPage
2000-04-10 23:41 lock_page/LockPage/UnlockPage Jim Mostek
@ 2000-04-11 12:47 ` Andrea Arcangeli
0 siblings, 0 replies; 2+ messages in thread
From: Andrea Arcangeli @ 2000-04-11 12:47 UTC (permalink / raw)
To: Jim Mostek; +Cc: linux-mm
On Mon, 10 Apr 2000, Jim Mostek wrote:
>Just a minor nit, but it seems to me that if UnlockPage wakes up
>sleepers, LockPage should go to sleep.
LockPage can be executed only in places where you know the page to be
unlocked. You could use it for example to set the PG_locked bitflag before
adding the page to the hashtable.
LockPage could be implemented with:
if (test_and_set_bit(PG_locked, &page->flags)
BUG();
And TryLockPage() should really not be changed since by design it's only a
bitflag operator and it's right it to remains so.
Only UnlockPage() should be called unlock_page() if you care about style.
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-04-11 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-10 23:41 lock_page/LockPage/UnlockPage Jim Mostek
2000-04-11 12:47 ` lock_page/LockPage/UnlockPage Andrea Arcangeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox