Received: by 10.223.164.202 with SMTP id h10csp2221589wrb; Fri, 24 Nov 2017 07:37:03 -0800 (PST) X-Google-Smtp-Source: AGs4zMbGuB7lQ2FN7DntBqlHiJ+rPPXOlRVt/RrDNvRIB8zcmIUowANz/1ZcTFk7LYzTHOykhafs X-Received: by 10.101.85.3 with SMTP id f3mr28195799pgr.45.1511537823662; Fri, 24 Nov 2017 07:37:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511537823; cv=none; d=google.com; s=arc-20160816; b=GdCN4zpImU7INlBQeWYbhRcUh4yH0pO6tIdqSKzN8h5os0mKAkD7CuGAJNMJN3N6Qc qZOKU0b3XYuB7dLFGVELXAqwyOS7wM8p9cqQHYtcnzzpT7fq044OVLSCVF3IHgQfCMnl iZslug2Et61rJTboy/5IilNBseP355PBicdR95CwD6iy6eY+1Od6Z1syPg5V2uHqgTtv JqcnlhyeQk+7ael8z8AWdt0rgdEo1I09HHnyiAkhHEwCN1RlFGvYd5znc/b3aMuKxuXM WUWFRRbWeoZfuqoPI9wEbK81PSeetSUk/mMzmANeo5mOE884yuj+QaJ7C7gfTTsce0yB XrOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=KhFjUNV2yCgSVZITszHVTDcOHZUMZCAnNwJXdN68w8Q=; b=ljhQUGpw0gRUoZgV/eE4aJBV0On6qs1x5qMWcC6XCuWn7XKjjNCdZvTWijkFIrstOm dBfGoFeQaORQZKmNg6NrDRP9Gb9dV1xN/YzD3rqOG1NKUu0GILAKZ++0ixuhj/CS7vIn oj7ZCdK0z1jNFaFhz4C4g14zArdu0osN/w//4RbcHhC9bgUegV/gVovyvymR5v/por/8 iYzSTAewhIrt9dzbpadWXqNZpoORNVZl3m2CnKOsT8iDvjCnBukxDgLR/bbdiV8jYiqn Ay7e1D6jQrXwWV/5LDRpWfrezFQI3ueJ/IcVdVXIYCF7dIvOj4WCuvCCtb4gz3XV9Wug 5GFA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p64si20561316pfl.131.2017.11.24.07.36.52; Fri, 24 Nov 2017 07:37:03 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753703AbdKXPgE (ORCPT + 77 others); Fri, 24 Nov 2017 10:36:04 -0500 Received: from mx2.suse.de ([195.135.220.15]:45619 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752288AbdKXPgD (ORCPT ); Fri, 24 Nov 2017 10:36:03 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5907DAAAD; Fri, 24 Nov 2017 15:36:02 +0000 (UTC) Date: Fri, 24 Nov 2017 07:32:49 -0800 From: Davidlohr Bueso To: Arnaldo Carvalho de Melo Cc: James Yang , Kim Phillips , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Darren Hart , Colin Ian King , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] perf bench futex: benchmark only online CPUs Message-ID: <20171124153249.ga4gdvsxl4t43uzt@linux-n805> References: <20171122182528.3a5ac33fa0563b9e25271659@arm.com> <20171123150948.GD8789@kernel.org> <20171123151100.GE8789@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20171123151100.GE8789@kernel.org> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Nov 2017, Arnaldo Carvalho de Melo wrote: >Em Thu, Nov 23, 2017 at 12:09:48PM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Wed, Nov 22, 2017 at 06:25:28PM -0600, Kim Phillips escreveu: >> > From: James Yang >> > >> > The "perf bench futex" benchmarks have a problem when not all CPUs in >> > the system are online: perf assumes the CPUs that are online are >> > contiguously numbered and assigns processor affinity to the threads by >> > modulo striping. When the online CPUs are not contiguously numbered, >> > perf errors out with: Good catch. Non contiguously numbered cpus was certainly not something I had considered. >> > >> > $ echo 0 | sudo tee /sys/devices/system/cpu/cpu3/online >> > 0 >> > $ ./oldperf bench futex all >> > perf: pthread_create: Operation not permitted >> > Run summary [PID 14934]: 7 threads, each operating on 1024 [private] futexes for 10 secs. >> > >> > $ >> > >> > This patch makes perf not assume all CPUs configured are online, and >> > adds a mapping table to stripe affinity across the CPUs that are >> > online. >> >> So, have you looked at tools/perf/util/cpumap.c? I think you can use: >> >> int i; >> struct cpu_map *cpus = cpu_map__new(NULL); >> >> for (i = 0; i < cpus->nr; ++i) { >> int cpu = cpus->map[i]; >> ... >> } >> >> No? Ah, I was just thinking there should be something like this in perf already :) > >But then, this can be done later, as probably will result in more >changes, I'm continuing to review the other patches. Unsure if you're implying otherwise, but I would strongly prefer a v2 was sent to use the perf's cpumap.c. Thanks, Davidlohr From 1584870204680947642@xxx Thu Nov 23 15:13:29 +0000 2017 X-GM-THRID: 1584814402419861775 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread