Re: [PATCH -mm 1/5] memcg: replace res_counter

Paul Menage
2008-10-21T02:20:19Z

On Mon, Oct 20, 2008 at 6:49 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@jp.fujitsu.com> wrote:
> If you give me NACK, maybe I have to try that..
> (But I believe aggregated child-parent counter will be verrrry slow.)

If it's really impossible to implement the aggregated version without
a significant performance hit then that might be a reason to have a
separate counter class. But I'd rather have a clean generic solution
if we can manage it.

> BTW, can we have *unsigned long* version of res_counter ?
> memcg doesn't need *unsigned long long*.

Potentially - but how often is a read-only operation on the
performance sensitive path? Don't most fast-path operations that
involve a res_counter have an update on the res_counter when they
succeed? In which case you have to pull the cache line into a Modified
state anyway.

>
> And as another discussion, I'd like optimize res_counter by per_cpu.

What were you thinking of doing for this?

Paul