lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110810032634.GB24486@localhost>
Date:	Wed, 10 Aug 2011 11:26:34 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	Vivek Goyal <vgoyal@...hat.com>
Cc:	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jan Kara <jack@...e.cz>, Christoph Hellwig <hch@....de>,
	Dave Chinner <david@...morbit.com>,
	Greg Thelen <gthelen@...gle.com>,
	Minchan Kim <minchan.kim@...il.com>,
	Andrea Righi <arighi@...eler.com>,
	linux-mm <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/5] writeback: IO-less balance_dirty_pages()

On Wed, Aug 10, 2011 at 02:15:43AM +0800, Vivek Goyal wrote:
> On Sat, Aug 06, 2011 at 04:44:52PM +0800, Wu Fengguang wrote:
> 
> [..]
> > -		trace_balance_dirty_start(bdi);
> > -		if (bdi_nr_reclaimable > task_bdi_thresh) {
> > -			pages_written += writeback_inodes_wb(&bdi->wb,
> > -							     write_chunk);
> > -			trace_balance_dirty_written(bdi, pages_written);
> > -			if (pages_written >= write_chunk)
> > -				break;		/* We've done our duty */
> > +		if (unlikely(!writeback_in_progress(bdi)))
> > +			bdi_start_background_writeback(bdi);
> > +
> > +		base_bw = bdi->dirty_ratelimit;
> > +		bw = bdi_position_ratio(bdi, dirty_thresh, nr_dirty,
> > +					bdi_thresh, bdi_dirty);
> 
> For the sake of consistency of usage of varibale naming how about using
> 
> pos_ratio = bdi_position_ratio()?

OK!

> > +		if (unlikely(bw == 0)) {
> > +			pause = MAX_PAUSE;
> > +			goto pause;
> >  		}
> > +		bw = (u64)base_bw * bw >> BANDWIDTH_CALC_SHIFT;
> 
> So far bw had pos_ratio as value now it will be replaced with actual
> bandwidth as value. It makes code confusing. So using pos_ratio will
> help.
> 
> 		bw = (u64)base_bw * pos_ratio >> BANDWIDTH_CALC_SHIFT;

Yeah it makes good sense. I'll change to.

 		rate = (u64)base_rate * pos_ratio >> BANDWIDTH_CALC_SHIFT;

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ