login
Header Space

 
 

Re: [PATCH -rt] avoid deadlock related with PG_nonewrefs and swap_lock

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Hiroshi Shimamoto <h-shimamoto@...>
Cc: Steven Rostedt <rostedt@...>, linux-rt-users <linux-rt-users@...>, Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, LKML <linux-kernel@...>, Clark Williams <williams@...>, Nick Piggin <nickpiggin@...>, hugh <hugh@...>
Date: Wednesday, March 26, 2008 - 5:50 am

On Mon, 2008-03-24 at 11:24 -0700, Hiroshi Shimamoto wrote:

Possibly yeah, Nick, Hugh?


I worry about this, Once we free the swap entry with swap_entry_free(),
and drop the swap_lock, another task is basically free to re-use that
swap location and try to insert another page in that same spot in
add_to_swap() - read_swap_cache_async() can't race because it would mean
it still has a swap entry pinned.

However, add_to_swap() can already handle the race, because it used to
race against read_swap_cache_async(). It also swap_free()s the entry so
as to not leak entries. So I think this is indeed correct.

[ I ought to find some time to port the concurrent page-cache patches on
  top of Nick's latest lockless series, Hugh's suggestion makes the
  speculative get much nicer. ]


Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: deadlock on 2.6.24.3-rt3, Steven Rostedt, (Mon Mar 17, 9:53 pm)
Re: deadlock on 2.6.24.3-rt3, Peter Zijlstra, (Tue Mar 18, 5:40 am)
[PATCH -rt] avoid deadlock related with PG_nonewrefs and swa..., Hiroshi Shimamoto, (Mon Mar 24, 2:24 pm)
Re: [PATCH -rt] avoid deadlock related with PG_nonewrefs and..., Peter Zijlstra, (Wed Mar 26, 5:50 am)
Re: deadlock on 2.6.24.3-rt3, Hiroshi Shimamoto, (Tue Mar 18, 1:15 pm)
Re: deadlock on 2.6.24.3-rt3, Hiroshi Shimamoto, (Thu Mar 20, 4:31 pm)
speck-geostationary