Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp242715pja; Fri, 22 Nov 2019 05:59:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzbST5HKx22PP1n0zHL4+kHzvlGVu85w8L7UoB5Jg87Ljeq/nRC82Z8yPBzx4UTnfTzIuBI X-Received: by 2002:aa7:d1c2:: with SMTP id g2mr1247499edp.164.1574431170088; Fri, 22 Nov 2019 05:59:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574431170; cv=none; d=google.com; s=arc-20160816; b=VFIhirjz309lAPktDJddFqabwURHGq8ajnjMGEXaIRtrQKmpZ+s3mq0OR/Jka6dvUI 8GbQ4XQFSbrEy44wEopRV0cKcP1q4LSiOtEYdTJ/MdA6Fy5iKO3v1EFPGdaE+tcL2cSX aupSK+D6EtwAyyM8iFDdOu1mr7wOoBYW57TbhwYfM66TNBRl/9lvk3xBhZmSvEdiegFk iq1dO9dL0ZviV7nyGGZjVaK9Z25BgarEuGa5TvAJ1Q7SoDYdCuws2nmkTwIwry9nqhdH M/eEI///FwDOny81hFveL/5GMwnUL3AUwosr1d3uIA0EOPsekZ4OnwOkZtkAaEZR0dBT 5/Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=CeC0gRdMmX1Oxj941beMvbXQ1Q7MeA+E6ujym9fbvnc=; b=Gx1Mn2YjqPFuj+PD42MgmOCNMdp4NhgLBw3S8gNs0mqKMKe40NhYo9ZlKl2uvBKtcP KPcLKc4ppSfduDh6IVcYTKGTdZ1q62AcJcq/Biw7buwui7YG4jMvFJmPSj4JJVamauGj Ds2eu08hRaGJqIrIxfi4vh5fXhSWMVE+AerR7u8hDI2MRsET71VsxjhAQVeb0SbknOCO /PLTqKHtSMgRtLcekWC+lGpAjR9itCn/uQpBpqoBq5mcXkJqXizfhXeDakmpoTB2NxcQ 7WA+xbdwOjHg1VrqMIsB9hY6WRs7UG1cPBc3DtoLQ/UpQJ2Xouk9d0FDmifvnWtRKnkx g2Tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a16si1933850ejs.215.2019.11.22.05.59.03; Fri, 22 Nov 2019 05:59:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728051AbfKVNzQ (ORCPT + 99 others); Fri, 22 Nov 2019 08:55:16 -0500 Received: from mga18.intel.com ([134.134.136.126]:58068 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726907AbfKVNzQ (ORCPT ); Fri, 22 Nov 2019 08:55:16 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Nov 2019 05:55:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,229,1571727600"; d="scan'208";a="210255586" Received: from linux.intel.com ([10.54.29.200]) by orsmga003.jf.intel.com with ESMTP; 22 Nov 2019 05:55:15 -0800 Received: from [10.251.82.176] (abudanko-mobl.ccr.corp.intel.com [10.251.82.176]) by linux.intel.com (Postfix) with ESMTP id 877F658051A; Fri, 22 Nov 2019 05:55:12 -0800 (PST) Subject: Re: [PATCH v1 3/3] perf record: adapt affinity to machines with #CPUs > 1K To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel References: <26d1512a-9dea-bf7e-d18e-705846a870c4@linux.intel.com> <2561f736-bdb5-a10a-1a5d-590ad499ce49@linux.intel.com> <20191122132226.GF17308@krava> From: Alexey Budankov Organization: Intel Corp. Message-ID: Date: Fri, 22 Nov 2019 16:55:10 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <20191122132226.GF17308@krava> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.11.2019 16:22, Jiri Olsa wrote: > On Wed, Nov 20, 2019 at 12:38:57PM +0300, Alexey Budankov wrote: > > SNIP > >> diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c >> -static void perf_mmap__setup_affinity_mask(struct mmap *map, struct mmap_params *mp) >> +static int perf_mmap__setup_affinity_mask(struct mmap *map, struct mmap_params *mp) >> { >> - CPU_ZERO(&map->affinity_mask); >> + map->affinity_mask.nbits = cpu__max_cpu(); >> + map->affinity_mask.bits = bitmap_alloc(map->affinity_mask.nbits); >> + if (!map->affinity_mask.bits) >> + return 1; > > I guess this works, but please return < 0 on error In v2. > > thanks, > jirka > > ~Alexey