login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
3
Re: [PATCH 3/6] writeback: avoid unnecessary calculation of bdi dirty thresholds
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Wu Fengguang
Subject:
Re: [PATCH 3/6] writeback: avoid unnecessary calculation of bdi dirty thresholds
Date: Tuesday, August 3, 2010 - 8:10 am
On Tue, Aug 03, 2010 at 11:03:42PM +0800, Peter Zijlstra wrote:
quoted text
> On Sun, 2010-07-11 at 10:06 +0800, Wu Fengguang wrote: > > plain text document attachment (writeback-less-bdi-calc.patch) > > Split get_dirty_limits() into global_dirty_limits()+bdi_dirty_limit(), > > so that the latter can be avoided when under global dirty background > > threshold (which is the normal state for most systems). > > The patch looks OK, although esp with the proposed comments in the > follow up email, bdi_dirty_limit() gets a bit confusing wrt to how and > what the limit is. > > Maybe its clearer to not call task_dirty_limit() from bdi_dirty_limit(), > that way the comment can focus on the device write request completion > proportion thing. > > > +unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, > > + unsigned long dirty) > > +{ > > + u64 bdi_dirty; > > + long numerator, denominator; > > > > + /* > > + * Calculate this BDI's share of the dirty ratio. > > + */ > > + bdi_writeout_fraction(bdi, &numerator, &denominator); > > > > + bdi_dirty = (dirty * (100 - bdi_min_ratio)) / 100; > > + bdi_dirty *= numerator; > > + do_div(bdi_dirty, denominator); > > > > + bdi_dirty += (dirty * bdi->min_ratio) / 100; > > + if (bdi_dirty > (dirty * bdi->max_ratio) / 100) > > + bdi_dirty = dirty * bdi->max_ratio / 100; > > + > + return bdi_dirty; > > } > > And then add the call to task_dirty_limit() here: > > > +++ linux-next/mm/backing-dev.c 2010-07-11 08:53:44.000000000 +0800 > > @@ -83,7 +83,8 @@ static int bdi_debug_stats_show(struct s > > nr_more_io++; > > spin_unlock(&inode_lock); > > > > - get_dirty_limits(&background_thresh, &dirty_thresh, &bdi_thresh, bdi); > > + global_dirty_limits(&background_thresh, &dirty_thresh); > > + bdi_thresh = bdi_dirty_limit(bdi, dirty_thresh); > + bdi_thresh = task_dirty_limit(current, bdi_thresh); > > And add a comment to task_dirty_limit() as well, explaining its reason > for existence (protecting light/slow dirtying tasks from heavier/fast > ones).
Good suggestions, that would be much less confusing. Will post updated patches tomorrow. Thanks, Fengguang --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/6] writeback cleanups and trivial fixes
, Wu Fengguang
, (Sat Jul 10, 7:06 pm)
[PATCH 1/6] writeback: take account of NR_WRITEBACK_TEMP i ...
, Wu Fengguang
, (Sat Jul 10, 7:06 pm)
[PATCH 2/6] writeback: reduce calls to global_page_state i ...
, Wu Fengguang
, (Sat Jul 10, 7:06 pm)
[PATCH 3/6] writeback: avoid unnecessary calculation of bd ...
, Wu Fengguang
, (Sat Jul 10, 7:06 pm)
[PATCH 5/6] writeback: fix queue_io() ordering
, Wu Fengguang
, (Sat Jul 10, 7:07 pm)
Re: [PATCH 0/6] writeback cleanups and trivial fixes
, Wu Fengguang
, (Sat Jul 10, 7:50 pm)
Re: [PATCH 1/6] writeback: take account of NR_WRITEBACK_TE ...
, Andrew Morton
, (Mon Jul 12, 2:52 pm)
Re: [PATCH 3/6] writeback: avoid unnecessary calculation o ...
, Andrew Morton
, (Mon Jul 12, 2:56 pm)
Re: [PATCH 5/6] writeback: fix queue_io() ordering
, Andrew Morton
, (Mon Jul 12, 3:15 pm)
Re: [PATCH 1/6] writeback: take account of NR_WRITEBACK_TE ...
, Miklos Szeredi
, (Tue Jul 13, 1:58 am)
Re: [PATCH 1/6] writeback: take account of NR_WRITEBACK_TE ...
, Wu Fengguang
, (Thu Jul 15, 7:50 am)
Re: [PATCH 3/6] writeback: avoid unnecessary calculation o ...
, Andrew Morton
, (Mon Jul 19, 2:35 pm)
Re: [PATCH 3/6] writeback: avoid unnecessary calculation o ...
, Wu Fengguang
, (Mon Jul 19, 8:34 pm)
Re: [PATCH 2/6] writeback: reduce calls to global_page_sta ...
, Jan Kara
, (Mon Jul 26, 8:19 am)
Re: [PATCH 2/6] writeback: reduce calls to global_page_sta ...
, Jan Kara
, (Tue Jul 27, 2:12 am)
Re: [PATCH 2/6] writeback: reduce calls to global_page_sta ...
, Wu Fengguang
, (Tue Jul 27, 7:04 pm)
Re: [PATCH 2/6] writeback: reduce calls to global_page_sta ...
, Peter Zijlstra
, (Tue Aug 3, 7:55 am)
Re: [PATCH 3/6] writeback: avoid unnecessary calculation o ...
, Peter Zijlstra
, (Tue Aug 3, 8:03 am)
Re: [PATCH 3/6] writeback: avoid unnecessary calculation o ...
, Wu Fengguang
, (Tue Aug 3, 8:10 am)
Re: [PATCH 3/6] writeback: avoid unnecessary calculation o ...
, Wu Fengguang
, (Wed Aug 4, 9:41 am)
Re: [PATCH 3/6] writeback: avoid unnecessary calculation o ...
, Peter Zijlstra
, (Wed Aug 4, 10:10 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Robin Lee Powell
NFS hang + umount -f: better behaviour requested.
Linus Torvalds
Linux 2.6.34-rc4
Colin Cross
[PATCH 12/21] ARM: tegra: Add suspend and hotplug support
git
:
Fredrik Kuivinen
Re: fatal: unable to create '.git/index': File exists
Wink Saville
How-to combine several separate git repos?
Emily Ren
How to pull remote branch with specified commit id?
Denis Bueno
Git clone error
pradeep singh
git-update-server-info may be required,cannot clone and pull from a remote reposit...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
frantisek holop
Re: splassert: vwakeup: and friends
linux-netdev
:
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Timo Teräs
ip xfrm policy semantics
Ron Mercer
[net-next PATCH 2/2] qlge: Version change to v1.00.00.27
Maciej W. Rozycki
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
git-commits-head
:
Linux Kernel Mailing List
powerpc/fsl_msi: enable msi allocation in all banks
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
[ARM] mmp: add dma support to mmp2
Colocation donated by:
Syndicate