login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
July
»
16
Re: [PATCH 3/3] cpuset: two minor code-cleanups
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Paul Menage
Subject:
Re: [PATCH 3/3] cpuset: two minor code-cleanups
Date: Wednesday, July 16, 2008 - 12:21 am
On Tue, Jul 15, 2008 at 8:43 PM, Lai Jiangshan <laijs@cn.fujitsu.com> wrote:
quoted text
> in function cpuset_update_task_memory_state() > local variable > struct task_struct *tsk = current; > > and local variable tsk is used 14 times and > statement task_cs(tsk) is used twice in this function. > So using task_cs(tsk) instead of task_cs(current) is > better for readability. > > And "(struct cgroup_scanner *)&scan" is not good for > readability also. (and "container_of" is used in cpuset_do_move_task(), > not "(cpuset_hotplug_scanner *)scan") > > Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com> Thanks.
quoted text
> --- > diff --git a/kernel/cpuset.c b/kernel/cpuset.c > index 798b3ab..4513deb 100644 > --- a/kernel/cpuset.c > +++ b/kernel/cpuset.c > @@ -369,7 +369,7 @@ void cpuset_update_task_memory_state(void) > my_cpusets_mem_gen = top_cpuset.mems_generation; > } else { > rcu_read_lock(); > - my_cpusets_mem_gen = task_cs(current)->mems_generation; > + my_cpusets_mem_gen = task_cs(tsk)->mems_generation; > rcu_read_unlock(); > } > > @@ -1778,7 +1778,7 @@ static void move_member_tasks_to_cpuset(struct cpuset *from, struct cpuset *to) > scan.scan.heap = NULL; > scan.to = to->css.cgroup; > > - if (cgroup_scan_tasks((struct cgroup_scanner *)&scan)) > + if (cgroup_scan_tasks(&scan.scan)) > printk(KERN_ERR "move_member_tasks_to_cpuset: " > "cgroup_scan_tasks failed\n"); > } > > > > > >
--
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 3/3] cpuset: two minor code-cleanups
, Lai Jiangshan
, (Tue Jul 15, 8:43 pm)
Re: [PATCH 3/3] cpuset: two minor code-cleanups
, Paul Menage
, (Wed Jul 16, 12:21 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Benjamin Herrenschmidt
Re: [PATCH 1/4] hvc_console: do not set low_latency
Russell King
Re: ARM defconfig files
Carsten Otte
Re: [patch] ext2: xip check fix
Jordan Crouse
Re: 2.6.25-mm1
James Morris
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_create LSM hook
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Johannes Schindelin
[PATCH] fetch: refuse to fetch into the current branch in a non-bare repository
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Peter Oberndorfer
Subject: [PATCH] fix stg edit command
Nicolas Pitre
Re: About git and the use of SHA-1
linux-netdev
:
Ursula Braun
[patch 2/8] [PATCH] af_iucv: sync sk shutdown flag if iucv path is quiesced
Andi Kleen
Re: RFC: Nagle latency tuning
Gary Thomas
Re: Marvell 88E609x switch?
David Miller
Re: [RFC 0/5] generic rx recycling
Chuck Lever
Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
dragonflybsd-user
:
Andreas Hauser
Re: Transset.
Tomas
usb printer Brother HL-2030 and DragonFly
Matthew Dillon
Re: DragonFlyBSD not in compliance with RFC 1122
Nikolai Lifanov
pkgsrc issues
Jonas
Re: New to DragonFly...
dragonflybsd-submit
:
Ilya Dryomov
git: HAMMER - Add live_dedup_cache_size sysctl
Matthew Dillon
git: MBUF - Account for failed allocations so netstat -m reports properly.
Simon Schubert
git: make.conf(5): mention STATIC_LOCALES
Matthias Schmidt
cvs commit: src/sys/net bpf.c bpf.h bpfdesc.h
Simon Schubert
git: Revert "Increase the default TCP maximum segment size from 512 to 1460."
Colocation donated by:
Syndicate