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: <5153EFB3.5070002@parallels.com>
Date:	Thu, 28 Mar 2013 11:22:27 +0400
From:	Glauber Costa <glommer@...allels.com>
To:	Michal Hocko <mhocko@...e.cz>
CC:	Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Johannes Weiner <hannes@...xchg.org>, <linux-mm@...ck.org>,
	<cgroups@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] memcg: fix memcg_cache_name() to use cgroup_name()

On 03/27/2013 08:27 PM, Michal Hocko wrote:
> On Wed 27-03-13 09:21:02, Tejun Heo wrote:
>> On Wed, Mar 27, 2013 at 9:19 AM, Michal Hocko <mhocko@...e.cz> wrote:
>>>> Maybe the name could signify it's part of memcg?
>>>
>>> kmem_ prefix is used for all CONFIG_MEMCG_KMEM functions. I understand
>>> it clashes with sl?b naming but this is out of scope of this patch IMO.
>>
>> Oh, it's not using kmemcg? I see. Maybe we can rename later.
> 
> Some parts use memcg_kmem_* other kmem_. A cleanup would be nice.
> Glauber?
> 
I have been using kmem_ only in functions that will deal directly with
the slab caches and with the single purpose of operating them.

kmem_cache_destroy_work_func => worker interface to kmem_cache_destroy
kmem_cache_destroy_memcg_children => cache destructor iterator
kmem_cache_dup => interface to kmem_cache_create

All the other functions start with memcg_
Analogously, all slab-side functions that deal with memcg *ends* with
_memcg. except the functions that are only there to operate memcg data
structures:

memcg_update_all_caches.

In general, those functions could very well live in the other file (slab
or memcg), but they need to take locks or manipulate data structures
that are internal to slab/memcg.

I believe this is a sound convention.
--
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