Re: memcg: cat: memory.memsw.* : Operation not supported

From: Tejun Heo
Date: Wed Jun 27 2012 - 16:09:27 EST


Hello, Michal, David.

On Wed, Jun 27, 2012 at 01:04:51PM -0700, David Rientjes wrote:
> I think it's a crappy solution and one that is undocumented in
> Documentation/cgroups/memory.txt. If you can only enable swap accounting
> at boot either via .config or the command line then these files should
> never be added for CONFIG_CGROUP_MEM_RES_CTLR_SWAP=n or when
> do_swap_account is 0. It's much easier to test if the feature is enabled
> by checking for the presence of these files at the memcg mount point
> rather than doing an open(2) and checking for -EOPNOTSUPP, which isn't
> even a listed error code. I don't care how much cleaner it makes the
> internal memcg code.

Yeah, it's kinda ugly. Taking a step back, do we really need be able
to configure out memsw? How much vmlinux bloat or runtime overhead
are we talking about? I don't think config options need to be this
granular.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/