Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754085AbbBZPZs (ORCPT ); Thu, 26 Feb 2015 10:25:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33935 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753684AbbBZPZr (ORCPT ); Thu, 26 Feb 2015 10:25:47 -0500 Message-ID: <54EF3AC9.3060808@redhat.com> Date: Thu, 26 Feb 2015 10:24:57 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Zefan Li CC: linux-kernel@vger.kernel.org, Peter Zijlstra , Clark Williams , Ingo Molnar , Luiz Capitulino , David Rientjes , Mike Galbraith , cgroups@vger.kernel.org Subject: Re: [PATCH 2/2] cpusets,isolcpus: add file to show isolated cpus in cpuset References: <1424882288-2910-1-git-send-email-riel@redhat.com> <1424882288-2910-3-git-send-email-riel@redhat.com> <54EEFE15.3010005@huawei.com> In-Reply-To: <54EEFE15.3010005@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1132 Lines: 39 On 02/26/2015 06:05 AM, Zefan Li wrote: >> +static void cpuset_seq_print_isolcpus(struct seq_file *sf, struct cpuset *cs) >> +{ >> + cpumask_var_t my_isolated_cpus; >> + >> + if (!alloc_cpumask_var(&my_isolated_cpus, GFP_KERNEL)) >> + return; >> + > > Make it return -ENOMEM ? Or make it a global variable and allocate memory for it > in cpuset_init(). OK, can do. I see that cpuset_common_seq_show already takes a lock, so having one global variable for this should not introduce any additional contention. I will send a v4. >> @@ -1733,6 +1748,9 @@ static int cpuset_common_seq_show(struct seq_file *sf, void *v) >> case FILE_EFFECTIVE_MEMLIST: >> seq_printf(sf, "%*pbl\n", nodemask_pr_args(&cs->effective_mems)); >> break; >> + case FILE_ISOLCPUS: >> + cpuset_seq_print_isolcpus(sf, cs); >> + break; >> default: >> ret = -EINVAL; >> } -- All rights reversed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/