From: Steve Dodd <steved@loth.demon.co.uk>
To: Dave Jones <dave@denial.force9.co.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.rutgers.edu>,
linux-mm@kvack.org
Subject: Re: [PATCH] remove_inode_page rewrite.
Date: Wed, 10 May 2000 11:10:36 +0100 [thread overview]
Message-ID: <20000510111035.A685@loth.demon.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.21.0005092051120.911-100000@neo.local>; from Dave Jones on Tue, May 09, 2000 at 09:14:08PM +0100
On Tue, May 09, 2000 at 09:14:08PM +0100, Dave Jones wrote:
> I believe that while after CPU0 drops the pagecache_lock, and starts
> removing one page, CPU1 fails to lock the same page (as CPU0 grabbed it
> with the trylock) and moves to the next page in the list, succeeds,
> removes it, and then rescans from the top.
>
> With the current locking I believe it's then possible for CPU1 to
> lock that page
Which page? CPU1 should never find the page CPU0 is freeing because it will
either be locked, or not on the list at all. By the time CPU0 unlocks the
page, it's removed it from the list (and it grabs the spinlock while messing
with the list structure).
> (again in the TryLockPage(page) call) just before CPU0
> calls page_cache_release(page)
>
> This patch probably kills us latency-wise, but looks a lot more
> sane in my eyes.
Now that invalidate_inode_page isn't calling sync_page, there seems to be
no reason to drop and retake the spinlock, I agree.
[..]
> - repeat:
> - head = &inode->i_mapping->pages;
> spin_lock(&pagecache_lock);
> +
> + head = &inode->i_mapping->pages;
That shouldn't be necessary - nobody is likely to change the address of
inode->i_mapping->pages under us :)
--
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/
next prev parent reply other threads:[~2000-05-10 10:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-09 20:14 [PATCH] remove_inode_page rewrite Dave Jones
2000-05-10 10:10 ` Steve Dodd [this message]
2000-05-10 17:25 ` Dave Jones
2000-05-10 20:55 ` Dave Jones
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=20000510111035.A685@loth.demon.co.uk \
--to=steved@loth.demon.co.uk \
--cc=dave@denial.force9.co.uk \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
/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