From: Andrea Arcangeli <andrea@suse.de>
To: Jim Mostek <mostek@sgi.com>
Cc: linux-mm@kvack.org
Subject: Re: lock_page/LockPage/UnlockPage
Date: Tue, 11 Apr 2000 14:47:14 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.21.0004111442180.25673-100000@maclaurin.suse.de> (raw)
In-Reply-To: <200004102341.SAA49583@fsgi344.americas.sgi.com>
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/
prev parent reply other threads:[~2000-04-11 12:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-10 23:41 lock_page/LockPage/UnlockPage Jim Mostek
2000-04-11 12:47 ` Andrea Arcangeli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.21.0004111442180.25673-100000@maclaurin.suse.de \
--to=andrea@suse.de \
--cc=linux-mm@kvack.org \
--cc=mostek@sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox