login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
November
»
18
Re: [PATCH v3] factor out kswapd sleeping logic from kswapd()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Mel Gorman
Subject:
Re: [PATCH v3] factor out kswapd sleeping logic from kswapd()
Date: Thursday, November 18, 2010 - 10:27 am
On Tue, Nov 16, 2010 at 03:07:22PM +0900, KOSAKI Motohiro wrote:
quoted text
> > > +void kswapd_try_to_sleep(pg_data_t *pgdat, int order) > > > +{ > > > > As pointed out elsewhere, this should be static. > > Fixed. > > > > > + long remaining = 0; > > > + DEFINE_WAIT(wait); > > > + > > > + if (freezing(current) || kthread_should_stop()) > > > + return; > > > + > > > + prepare_to_wait(&pgdat->kswapd_wait, &wait, TASK_INTERRUPTIBLE); > > > + > > > + /* Try to sleep for a short interval */ > > > + if (!sleeping_prematurely(pgdat, order, remaining)) { > > > + remaining = schedule_timeout(HZ/10); > > > + finish_wait(&pgdat->kswapd_wait, &wait); > > > + prepare_to_wait(&pgdat->kswapd_wait, &wait, TASK_INTERRUPTIBLE); > > > + } > > > + > > > + /* > > > + * After a short sleep, check if it was a > > > + * premature sleep. If not, then go fully > > > + * to sleep until explicitly woken up > > > + */ > > > > Very minor but that comment should now fit on fewer lines. > > Thanks, fixed. > > > > > + if (!sleeping_prematurely(pgdat, order, remaining)) { > > > + trace_mm_vmscan_kswapd_sleep(pgdat->node_id); > > > + set_pgdat_percpu_threshold(pgdat, calculate_normal_threshold); > > > + schedule(); > > > + set_pgdat_percpu_threshold(pgdat, calculate_pressure_threshold); > > > > I posted a patch adding a comment on why set_pgdat_percpu_threshold() is > > called. I do not believe it has been picked up by Andrew but it if is, > > the patches will conflict. The resolution will be obvious but you may > > need to respin this patch if the comment patch gets picked up in mmotm. > > > > Otherwise, I see no problems. > > OK, I've rebased the patch on top your comment patch. > > > > From 1bd232713d55f033676f80cc7451ff83d4483884 Mon Sep 17 00:00:00 2001 > From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> > Date: Mon, 6 Dec 2010 20:44:27 +0900 > Subject: [PATCH] factor out kswapd sleeping logic from kswapd() > > Currently, kswapd() function has deeper nest and it slightly harder to > read. cleanup it. > > Cc: Mel Gorman <mel@csn.ul.ie> > Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Mel Gorman <mel@csn.ul.ie> -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab --
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] cleanup kswapd()
, KOSAKI Motohiro
, (Sun Nov 14, 2:05 am)
Re: [PATCH] cleanup kswapd()
, Jesper Juhl
, (Sun Nov 14, 4:03 am)
Re: [PATCH] cleanup kswapd()
, KOSAKI Motohiro
, (Sun Nov 14, 5:27 pm)
Re: [PATCH] cleanup kswapd()
, KOSAKI Motohiro
, (Sun Nov 14, 6:37 pm)
Re: [PATCH] cleanup kswapd()
, Mel Gorman
, (Mon Nov 15, 2:42 am)
[PATCH v3] factor out kswapd sleeping logic from kswapd()
, KOSAKI Motohiro
, (Mon Nov 15, 11:07 pm)
Re: [PATCH v3] factor out kswapd sleeping logic from kswapd()
, Mel Gorman
, (Thu Nov 18, 10:27 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Re: [PATCH 1/1] staging: hv: Fix race condition on IC channel initialization (modi...
Sam Ravnborg
[PATCH 05/11] x86: add X86_64 dependency to x86_64 specific symbols in Kconfig.x86...
Christoph Lameter
Re: [PATCH 02/40] mm: slab allocation fairness
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Brian Swetland
Re: Attempted summary of suspend-blockers LKML thread
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Paolo Ciarrocchi
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Sverre Rabbelier
Re: [GSoC] What is status of Git's Google Summer of Code 2008 projects?
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Peter Oberndorfer
Subject: [PATCH] fix stg edit command
linux-netdev
:
Andi Kleen
Re: RFC: Nagle latency tuning
Jarek Poplawski
Re: tc filter flow hash question
David Miller
Re: [RFC 0/5] generic rx recycling
Chuck Lever
Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
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
New device ID for sc92031 [1088:2031]
Linux Kernel Mailing List
e1000e: Expose MDI-X status via ethtool change
Linux Kernel Mailing List
NFS: Store pages from an NFS inode into a local cache
Linux Kernel Mailing List
arm/imx/gpio: GPIO_INT_{HIGH,LOW}_LEV are not necessarily constant
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
openbsd-misc
:
Theo de Raadt
Re: RES: OpenBSD on IBM System X3550 7879
Bret S. Lambert
Re: any web management gui for pf ?
Leif Blixt
Re: Force passwordcheck in login.conf
Rob Shepherd
x86 hardware for router system
ropers
Re: Real men don't attack straw men
Colocation donated by:
Syndicate