From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH 06/13] cpuset: cleanup cpuset[_can]_attach() Date: Wed, 26 Dec 2012 18:20:11 +0800 Message-ID: <50DACF5B.6050705@huawei.com> References: <1354138460-19286-1-git-send-email-tj@kernel.org> <1354138460-19286-7-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1354138460-19286-7-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, mhocko-AlSwsSmVLrQ@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org On 2012/11/29 5:34, Tejun Heo wrote: > cpuset_can_attach() prepare global variables cpus_attach and > cpuset_attach_nodemask_{to|from} which are used by cpuset_attach(). > There is no reason to prepare in cpuset_can_attach(). The same > information can be accessed from cpuset_attach(). > > Move the prepartion logic from cpuset_can_attach() to cpuset_attach() > and make the global variables static ones inside cpuset_attach(). > > While at it, convert cpus_attach to cpumask_t from cpumask_var_t. > There's no reason to mess with dynamic allocation on a static buffer. > But Rusty had been deprecating the use of cpumask_t. I don't know why the final deprecation hasn't been completed yet. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx175.postini.com [74.125.245.175]) by kanga.kvack.org (Postfix) with SMTP id 32D3B6B0044 for ; Wed, 26 Dec 2012 05:22:03 -0500 (EST) Message-ID: <50DACF5B.6050705@huawei.com> Date: Wed, 26 Dec 2012 18:20:11 +0800 From: Li Zefan MIME-Version: 1.0 Subject: Re: [PATCH 06/13] cpuset: cleanup cpuset[_can]_attach() References: <1354138460-19286-1-git-send-email-tj@kernel.org> <1354138460-19286-7-git-send-email-tj@kernel.org> In-Reply-To: <1354138460-19286-7-git-send-email-tj@kernel.org> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Tejun Heo Cc: paul@paulmenage.org, glommer@parallels.com, containers@lists.linux-foundation.org, cgroups@vger.kernel.org, peterz@infradead.org, mhocko@suse.cz, bsingharora@gmail.com, hannes@cmpxchg.org, kamezawa.hiroyu@jp.fujitsu.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org On 2012/11/29 5:34, Tejun Heo wrote: > cpuset_can_attach() prepare global variables cpus_attach and > cpuset_attach_nodemask_{to|from} which are used by cpuset_attach(). > There is no reason to prepare in cpuset_can_attach(). The same > information can be accessed from cpuset_attach(). > > Move the prepartion logic from cpuset_can_attach() to cpuset_attach() > and make the global variables static ones inside cpuset_attach(). > > While at it, convert cpus_attach to cpumask_t from cpumask_var_t. > There's no reason to mess with dynamic allocation on a static buffer. > But Rusty had been deprecating the use of cpumask_t. I don't know why the final deprecation hasn't been completed yet. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754300Ab2LZKVb (ORCPT ); Wed, 26 Dec 2012 05:21:31 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:64335 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754219Ab2LZKV3 (ORCPT ); Wed, 26 Dec 2012 05:21:29 -0500 Message-ID: <50DACF5B.6050705@huawei.com> Date: Wed, 26 Dec 2012 18:20:11 +0800 From: Li Zefan User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Tejun Heo CC: , , , , , , , , , , Subject: Re: [PATCH 06/13] cpuset: cleanup cpuset[_can]_attach() References: <1354138460-19286-1-git-send-email-tj@kernel.org> <1354138460-19286-7-git-send-email-tj@kernel.org> In-Reply-To: <1354138460-19286-7-git-send-email-tj@kernel.org> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.135.68.215] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2012/11/29 5:34, Tejun Heo wrote: > cpuset_can_attach() prepare global variables cpus_attach and > cpuset_attach_nodemask_{to|from} which are used by cpuset_attach(). > There is no reason to prepare in cpuset_can_attach(). The same > information can be accessed from cpuset_attach(). > > Move the prepartion logic from cpuset_can_attach() to cpuset_attach() > and make the global variables static ones inside cpuset_attach(). > > While at it, convert cpus_attach to cpumask_t from cpumask_var_t. > There's no reason to mess with dynamic allocation on a static buffer. > But Rusty had been deprecating the use of cpumask_t. I don't know why the final deprecation hasn't been completed yet.