lkml.org 
[lkml]   [2010]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mmotm] memcg: implement memory thresholds document fixes
On Thu, 7 Jan 2010 14:22:56 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2010-01-07 10:18:05]:
>
> > On Thu, 7 Jan 2010 09:57:14 +0900
> > Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
> >
> > > Each memcg-implement-memory-thresholds.patch and
> > > memcg-add-interface-to-move-charge-at-task-migration.patch try to add a new
> > > section to Documentation/cgroup/memory.txt, so the document has been a bit
> > > mangled when these patches are merged at the same time.
> > >
> > > This patch fixes it.
> > >
> >
> > Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> >
> > BTW, I'll prepare total update for memcg (especially around percpu counter).
> > Do you have something may conflict in plan ?
>
> Kame, could you clarify percpu counter? Is this on for resource
> counter scalability patches I had?
>
No.

Now. memcg's percpu counter uses following code.
==
static inline void
__mem_cgroup_stat_set_safe(struct mem_cgroup_stat_cpu *stat,
enum mem_cgroup_stat_index idx, s64 val)
{
stat->count[idx] = val;
}
static int mem_cgroup_size(void)
{
int cpustat_size = nr_cpu_ids * sizeof(struct mem_cgroup_stat_cpu);
return sizeof(struct mem_cgroup) + cpustat_size;
}

static struct mem_cgroup *mem_cgroup_alloc(void)
{
struct mem_cgroup *mem;
int size = mem_cgroup_size();

if (size < PAGE_SIZE)
mem = kmalloc(size, GFP_KERNEL);
else
mem = vmalloc(size);

==

But this is not NUMA-aware and slow. i.e. BAD.

Now, we have good codes for percpu_alloc(). we should use it.

like this => http://patchwork.kernel.org/patch/58662/

Things will be simplified.
I need to rewrite all to catch up recent changes _AND_ we have to
detect why 2 seconds of overhead is added by threshold patches.
And hopefuly, reduce it. I think softlimit/threshold event counter
can be rewritten in unified clean way.

Thanks,
-Kame







\
 
 \ /
  Last update: 2010-01-07 10:09    [W:0.531 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site