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]
Message-ID: <5867.1285945621@redhat.com>
Date:	Fri, 01 Oct 2010 16:07:01 +0100
From:	David Howells <dhowells@...hat.com>
To:	"Steve Magnani" <steve@...idescorp.com>
Cc:	dhowells@...hat.com, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, kamezawa.hiroyu@...fujitsu.com
Subject: Re: [PATCH][RESEND] nommu: add anonymous page memcg accounting

Steve Magnani <steve@...idescorp.com> wrote:

> If anything I think nommu is one of the better applications of memcg. Since
> nommu typically embedded, being able to put potential memory pigs in a
> sandbox so they can't destabilize the system is a Good Thing. That was my
> motivation for doing this in the first place and it works quite well.

I suspect it's not useful for a few reasons:

 (1) You don't normally run many applications on a NOMMU system.  Typically,
     you'll run just one, probably threaded app, I think.

 (2) In general, you won't be able to cull processes to make space.  If the OOM
     killer runs your application has a bug in it.

 (3) memcg has a huge overhead.  20 bytes per page!  On a 4K page 32-bit
     system, that's nearly 5% of your RAM, assuming I understand the
     CGROUP_MEM_RES_CTLR config help text correctly.

 (4) There's no swapping, no page faults, no migration and little shareable
     memory.  Being able to allocate large blocks of contiguous memory is much
     more important and much more of a bottleneck than this.  The 5% of RAM
     lost makes that just that little bit harder.

If it's memory sandboxing you require, ulimit might be sufficient for NOMMU
mode.

However, I suppose there's little harm in letting the patch in.  I would guess
the additions all optimise away if memcg isn't enabled.

A question for you: why does struct page_cgroup need a page pointer?  If an
array of page_cgroup structs is allocated per array of page structs, then you
should be able to use the array index to map between them.

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