Re: Documentation/vm/locking: why not hold two PT locks?

Kanoj Sarcar
2004-02-09T18:20:13Z

--- Ed L Cashin <ecashin@uga.edu> wrote:
> Kanoj Sarcar <kanojsarcar@yahoo.com> writes:
>
> ...
> > Its been a while since I wrote up those rules in
> > the "locking" file, but the example that Robert
> has
> > pointed out involving two different threads, each
> > crabbing one mm lock and trying for the next one,
> > is the deadlock I had in mind. There may have been
> > new changes in 2.5 timeframe that also requires
> > the rule, I am not sure.
>
> Thanks, Kanoj!
>
> After further looking into it, one thing in
> Documentation/vm/locking
> does seem out of date. It says that "Page stealers
> hold kernel_lock
> to protect against a bunch of races."
>
> The only page stealing code that I can find is in
> rmap.c and vmscan.c.
> When vmscan.c:shrink_caches and its callees need to
> unmap a page,
> rmap.c:try_to_unmap gets called. But nowhere is
> there a lock_kernel
> call that I could find. Instead, they use trylocks
> and get the page
> table lock before stealing a page.
>
> Are there other page stealers?
>

Hi,

When "locking" came into being, vmscan was the only
page stealer.

Thanks.

Kanoj

> --
> --Ed L Cashin PGP public key:
> http://noserose.net/e/pgp/
>
> --
> 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-mm.org/ .
> Don't email:
> aart@kvack.org

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.