[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110902025255.GA28584@localhost>
Date: Fri, 2 Sep 2011 10:52:55 +0800
From: Wu Fengguang <fengguang.wu@...el.com>
To: Jan Kara <jack@...e.cz>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Dave Chinner <david@...morbit.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] writeback: fix BDI_WRITTEN accounting disturbing
bdi->completions
On Fri, Sep 02, 2011 at 12:29:50AM +0800, Jan Kara wrote:
> On Thu 01-09-11 22:40:41, Wu Fengguang wrote:
> > Peter,
> >
> > This is an amazing bug. I'm not sure how the accounting goes wrong in
> > some tricky way. But you can compare the exact bdi proportions pattern
> > before/after patch. The gray "bdi setpoint" lines are vastly different.
> >
> > ---
> > When increasing BDI_WRITTEN together with bdi->completions inside the
> > same local irq disabling block, bdi_thresh is found to go wild in the
> > 1 disk + 1 usb stick writeback test case. Fix it by moving BDI_WRITTEN
> > accounting out.
> I don't understand this - the patch is just NOP. The change in
> test_clear_page_writeback() does absolutely nothing and the change in
> bdi_writeout_inc() just changes:
> local_irq_save(flags);
> __inc_bdi_stat(bdi);
> __prop_inc_percpu_max(&vm_completions, &bdi->completions,
> bdi->max_prop_frac);
> local_irq_restore(flags);
>
> to:
> local_irq_save(flags);
> __inc_bdi_stat(bdi);
> local_irq_restore(flags);
> local_irq_save(flags);
> __prop_inc_percpu_max(&vm_completions, &bdi->completions,
> bdi->max_prop_frac);
> local_irq_restore(flags);
>
> So the difference must be in something else...
Yes you are right -- this patch is basically a NOP. I retried without
this patch and it's now working fine again. Something mysterious to
catch..
Thanks,
Fengguang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists