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  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]
Date:	Thu, 23 Jun 2011 15:48:50 +0200
From:	Michal Hocko <mhocko@...e.cz>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"nishimura@....nes.nec.co.jp" <nishimura@....nes.nec.co.jp>,
	"bsingharora@...il.com" <bsingharora@...il.com>,
	Ying Han <yinghan@...gle.com>,
	"hannes@...xchg.org" <hannes@...xchg.org>
Subject: Re: [PATCH 7/7] memcg: proportional fair vicitm node selection

On Thu 16-06-11 12:57:41, KAMEZAWA Hiroyuki wrote:
> From 4fbd49697456c227c86f1d5b46f2cd2169bf1c5b Mon Sep 17 00:00:00 2001
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> Date: Thu, 16 Jun 2011 11:25:23 +0900
> Subject: [PATCH 7/7] memcg: proportional fair node vicitm selection
> 
> commit 889976 implements a round-robin scan of numa nodes for
> LRU scanning of memcg at hitting limit.
> But, round-robin is not very good.
> 
> This patch implements a proportionally fair victim selection of nodes
> rather than round-robin. The logic is fair against each node's weight.
> 
> Each node's weight is calculated periodically and we build an node's
> scheduling entity as
> 
>      total_ticket = 0;
>      for_each_node(node)
>      	node->ticket_start =  total_ticket;
>         node->ticket_end   =  total_ticket + this_node's_weight()
>         total_ticket = node->ticket_end;
> 
> Then, each nodes has some amounts of tickets in proportion to its own weight.
> 
> At selecting victim, a random number is selected and the node which contains
> the random number in [ticket_start, ticket_end) is selected as vicitm.
> This is a lottery scheduling algorithm.
> 
> For quick search of victim, this patch uses bsearch().
> 
> Test result:
>   on 8cpu box with 2 nodes.
>   limit memory to be 300MB and run httpd for 4096files/600MB working set.
>   do (normalized) random access by apache-bench and see scan_stat.
>   The test makes 40960 request. and see scan_stat.
>   (Because a httpd thread just use 10% cpu, the number of threads will
>    not be balanced between nodes. Then, file caches will not be balanced
>    between nodes.)

Have you also tried to test with balanced nodes? I mean, is there any
measurable overhead?

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
--
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