lkml.org 
[lkml]   [2008]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [RT] avoid preemption in memory controller code
CC: Balbir Singh <balbir@linux.vnet.ibm.com>
CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

Tim Blechmann wrote:
> the lru_lock of struct mem_group_per_zone is used to avoid preemption
> during the __mem_cgroup_stat_add_safe function.
> therefore, a raw_spinlock_t should be used.
>

FYI, this lru_lock no longer exists in -mm tree. The following patch
removes that lock:

http://marc.info/?l=linux-mm&m=122665814801979&w=2

> Signed-off-by: Tim Blechmann <tim@klingt.org>
> ---
> mm/memcontrol.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 517f945..8661732 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -95,9 +95,9 @@ enum mem_cgroup_zstat_index {
>
> struct mem_cgroup_per_zone {
> /*
> - * spin_lock to protect the per cgroup LRU
> + * raw_spin_lock to protect the per cgroup LRU
> */
> - spinlock_t lru_lock;
> + raw_spinlock_t lru_lock;
> struct list_head active_list;
> struct list_head inactive_list;
> unsigned long count[NR_MEM_CGROUP_ZSTAT];




\
 
 \ /
  Last update: 2008-12-09 02:17    [W:1.482 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site