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  linux-hardening  linux-cve-announce  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, 7 Jan 2010 18:04:01 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	balbir@...ux.vnet.ibm.com
Cc:	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	akpm@...ux-foundation.org, LKML <linux-kernel@...r.kernel.org>,
	"Kirill A. Shutemov" <kirill@...temov.name>
Subject: Re: [PATCH -mmotm] memcg: implement memory thresholds document
 fixes

On Thu, 7 Jan 2010 14:22:56 +0530
Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> [2010-01-07 10:18:05]:
> 
> > On Thu, 7 Jan 2010 09:57:14 +0900
> > Daisuke Nishimura <nishimura@....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@...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





--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ