lkml.org 
[lkml]   [2012]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/9] writeback: introduce the pageout work
On Sat, 3 Mar 2012 21:25:55 +0800
Fengguang Wu <fengguang.wu@intel.com> wrote:

> > > get_page() looks the perfect solution to verify if the struct inode
> > > pointer (w/o igrab) is still live and valid.
> > >
> > > [...upon rethinking...] Oh but still we need to lock some page to pin
> > > the inode during the writeout. Then there is the dilemma: if the page
> > > is locked, we effectively keep it from being written out...
> >
> > No, all you need to do is to structure the code so that after the page
> > gets unlocked, the kernel thread does not touch the address_space. So
> > the processing within the kthread is along the lines of
> >
> > writearound(locked_page)
> > {
> > write some pages preceding locked_page; /* touches address_space */
>
> It seems the above line will lead to ABBA deadlock.
>
> At least btrfs will lock a number of pages in lock_delalloc_pages().

Well, this code locks multiple pages too. I forget what I did about
that - probably trylock. Dirty pages aren't locked for very long.



\
 
 \ /
  Last update: 2012-03-07 01:41    [W:0.081 / U:2.240 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site