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, 03 Apr 2008 22:45:09 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	Paul Menage <menage@...gle.com>
CC:	Pavel Emelianov <xemul@...nvz.org>,
	Hugh Dickins <hugh@...itas.com>,
	Sudhir Kumar <skumar@...ux.vnet.ibm.com>,
	YAMAMOTO Takashi <yamamoto@...inux.co.jp>, lizf@...fujitsu.com,
	linux-kernel@...r.kernel.org, taka@...inux.co.jp,
	linux-mm@...ck.org, David Rientjes <rientjes@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [-mm] Add an owner to the mm_struct (v6)

Paul Menage wrote:
> On Thu, Apr 3, 2008 at 12:30 AM, Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:
>>  +         This option enables mm_struct's to have an owner. The advantage
>>  +         of this approach is that it allows for several independent memory
>>  +         based cgorup controllers to co-exist independently without too
> 
> cgorup -> cgroup
> 

yes, typo

>>  +       if (need_mm_owner_callback) {
>>  +               int i;
>>  +               for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
>>  +                       struct cgroup_subsys *ss = subsys[i];
>>  +                       oldcgrp = task_cgroup(old, ss->subsys_id);
>>  +                       newcgrp = task_cgroup(new, ss->subsys_id);
>>  +                       if (oldcgrp == newcgrp)
>>  +                               continue;
>>  +                       if (ss->mm_owner_changed)
>>  +                               ss->mm_owner_changed(ss, oldcgrp, newcgrp);
> 
> Even better, maybe just pass in the relevant cgroup_subsys_state
> objects here, rather than the cgroup objects?
> 

Is that better than passing the cgroups? All the callbacks I see usually pass
either task_struct or cgroup. Won't it be better, consistent use of API to pass
either of those?

>>         css_get(&mem->css);
>>  -       rcu_assign_pointer(mm->mem_cgroup, mem);
>>         css_put(&old_mem->css);
> 
> These get/put calls are now unwanted?
> 

Yes, will remove them

> Could you also add comments in mm_need_new_owner(), in particular the
> reason for checking for delay_group_leader() ?

Yep, will do

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
--
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