Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1531698ybg; Wed, 23 Oct 2019 17:47:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzj/tKIMm+c7D8ZCbsAtueuE9kqikhb526nX5FXFw3mis7hQuAN4xeOwLlZB4LVsjaN+Sxn X-Received: by 2002:a50:84e9:: with SMTP id 96mr13176662edq.182.1571878027515; Wed, 23 Oct 2019 17:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571878027; cv=none; d=google.com; s=arc-20160816; b=uJ8KcGbgakfeTaTijSQ0e4bF72WX0eH7zbGVCc1gA8peMT0NxvSTPZCRr+uMNPTjak HWnDGtvQbRYjargq9KTl2Z9Ao7a3NNEya54fkZZ9qMh6FcbKCDEOcTvhFwybr1HFHMi6 Dq7ObXjIBwjHUYZ7zbMtg+bjQE8ZOVYKKTH87TS8TfMSaph0CTZ9HU1PGxFm2PBWimLp lHS7CqJ/kv6jH/u3WRS/tBZlnrUJ4pzo0LFQt4kcnX5f0yvryuwAwCo88CH7aCah6MbH PDOTs7ZD0RcVmlHj0ReCamr9J0afNbrg5yNn6+tjRPA5JQZlHe6FJSYpLSUC6HALmjld vGsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2VjSorhOuc9UCrlZzlLM8XD5fgipJEwO0zoV+pcgad4=; b=t4xDJ3fdmHW1ayyxivBO8e6+Vfh5feKmvJvHMxv6eSyNI5FJ1FTz/OQpjJXzyepRUT tqDSrTtorv9GyosvBD0ymYPTWTgCAJUOtZWxy1YsBTUrmV0zs4Ea/q7imiVYuFjuG8No j93h6IgfuFI0zuBc+dCPMw9Zi1uzC0x9gSmOFH9sKZudpv24BGQ+pUSf2OUB3qddJ3vO bxwT9v5E6BGspnxvzaIdLs1Hcn38RH+5tVfMSl6nQ5qvYRERBi6NF02JMf+sM3tdXUt3 8tVIoHmD+h6CnGuhkm6HI20TQTVpUFMD9PWV3b4pWmAhvejq6j1O0iPH9IO2isAccRUv 4MFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PliAV2FY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si13704184eda.192.2019.10.23.17.45.38; Wed, 23 Oct 2019 17:47:07 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PliAV2FY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406252AbfJWOa7 (ORCPT + 99 others); Wed, 23 Oct 2019 10:30:59 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:38017 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2403845AbfJWOa7 (ORCPT ); Wed, 23 Oct 2019 10:30:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571841058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2VjSorhOuc9UCrlZzlLM8XD5fgipJEwO0zoV+pcgad4=; b=PliAV2FYbevwwyM6dkmwPGIcFPgPJXampgSWErrMRCRz4ZO5oO6zF3JvMatUhdN3vCu9Py TXXjfcvsYavjLgsXC2dP5eyu/KWnHStY9ezSQlO6ztE6/CCiigKC/kWadrhkCfFdwAuYax R5ODZ0/OKcu80jvYSR9onWcqEIUMXr0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-230-amZsD0HRNKeg2CfEQMEMQA-1; Wed, 23 Oct 2019 10:30:54 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 123095E6; Wed, 23 Oct 2019 14:30:52 +0000 (UTC) Received: from krava (ovpn-204-191.brq.redhat.com [10.40.204.191]) by smtp.corp.redhat.com (Postfix) with SMTP id 64DEA1001B05; Wed, 23 Oct 2019 14:30:50 +0000 (UTC) Date: Wed, 23 Oct 2019 16:30:49 +0200 From: Jiri Olsa To: Andi Kleen Cc: Andi Kleen , acme@kernel.org, linux-kernel@vger.kernel.org, jolsa@kernel.org, eranian@google.com, kan.liang@linux.intel.com, peterz@infradead.org Subject: Re: [PATCH v2 4/9] perf affinity: Add infrastructure to save/restore affinity Message-ID: <20191023143049.GS22919@krava> References: <20191020175202.32456-1-andi@firstfloor.org> <20191020175202.32456-5-andi@firstfloor.org> <20191023095911.GJ22919@krava> <20191023130235.GF4660@tassilo.jf.intel.com> MIME-Version: 1.0 In-Reply-To: <20191023130235.GF4660@tassilo.jf.intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: amZsD0HRNKeg2CfEQMEMQA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 23, 2019 at 06:02:35AM -0700, Andi Kleen wrote: > On Wed, Oct 23, 2019 at 11:59:11AM +0200, Jiri Olsa wrote: > > On Sun, Oct 20, 2019 at 10:51:57AM -0700, Andi Kleen wrote: > >=20 > > SNIP > >=20 > > > +} > > > diff --git a/tools/perf/util/affinity.h b/tools/perf/util/affinity.h > > > new file mode 100644 > > > index 000000000000..e56148607e33 > > > --- /dev/null > > > +++ b/tools/perf/util/affinity.h > > > @@ -0,0 +1,15 @@ > > > +// SPDX-License-Identifier: GPL-2.0 > > > +#ifndef AFFINITY_H > > > +#define AFFINITY_H 1 > > > + > > > +struct affinity { > > > +=09unsigned char *orig_cpus; > > > +=09unsigned char *sched_cpus; > >=20 > > why not use cpu_set_t directly? >=20 > Because it's too small in glibc (only 1024 CPUs) and perf already=20 > supports more. nice, we're using it all over the place.. how about using bitmap_alloc? jirka