From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Pekka J Enberg <penberg@cs.helsinki.fi>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] revoke: misc fixes
Date: Fri, 16 Mar 2007 18:50:49 +1100 [thread overview]
Message-ID: <45FA4C59.1000908@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.64.0703160943460.15253@sbz-30.cs.Helsinki.FI>
Pekka J Enberg wrote:
> Hi Nick,
>
> On Fri, 16 Mar 2007, Nick Piggin wrote:
>
>>Could you try something like walk the i_mmap lists to find mms with vmas that
>>haven't need revoking, then each time you find one, take a ref on the mm, drop
>>i_mmap_lock, take mmap_sem, and walk all its vmas looking for any that
>>reference the inode?
>
>
> Yes, that would work. What I am cooking up now is dropping
> ->i_mmap_lock, restarting the scan after each revoke_vma() and skipping
> vmas that are VM_REVOKED.
Of course you can't take a reference to a vma, so to pin a vma you need
the mmap_sem, and to do that you need to drop i_mmap_lock, which means
your vma might go away ;)
So I think you really do need to get back to the mm, and then search its
vmas.
Also, a down_write_trylock attempt inside i_mmap_lock should be a valid
optimisation.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2007-03-16 7:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 7:17 [PATCH 1/3] revoke: misc fixes Pekka J Enberg
2007-03-16 7:21 ` Nick Piggin
2007-03-16 7:29 ` Pekka J Enberg
2007-03-16 7:38 ` Nick Piggin
2007-03-16 7:45 ` Pekka J Enberg
2007-03-16 7:50 ` Nick Piggin [this message]
2007-03-16 7:51 ` Pekka J Enberg
2007-03-16 8:52 ` Pekka Enberg
2007-03-19 5:37 ` Nick Piggin
2007-03-19 6:59 ` Pekka J Enberg
-- strict thread matches above, loose matches on Subject: below --
2007-03-16 9:47 Pekka J Enberg
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=45FA4C59.1000908@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.