Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp604134ybg; Wed, 23 Oct 2019 03:04:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4tGq6Vt1MyR8ErtmwUJpgNy3kN5rcV6XlQLDq2vgyR+emb+a5k4Nby03kpZSQL480d6iI X-Received: by 2002:a17:906:5e50:: with SMTP id b16mr31770137eju.156.1571825048949; Wed, 23 Oct 2019 03:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571825048; cv=none; d=google.com; s=arc-20160816; b=OLuInm2RoXZVS/pBVJzfTXUQvSAX0ZlFx81JaSqv5XefqusA7IshVfrfJMPGBVHNEg r6cbgnmH78FvIMialBH7WewOFsUZsqmUb9MnniAh+mgviRXsBX8avbGOM+xKJxb3fKXK wvhejxhjobCVKOmsX17t8l6BHii1AoucEVqnx9atANjS9BI7z0b9mbmtJDH14gfdQre9 7cYHefPoEirK+uQg6uQeCuyQvkVNkSCYBKzQ3SpMv5pyrCfh3vPnCXRnRIndPAMPG/81 aYJDye4+Mrrgs6w91QLR3ykIzY+87vtyNupNhNDQ/ho1D7lXCxuqrk3mY2AvpDkDmITf gjlw== 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=H97WqW0j/xwCI0yXKzrYyNUvs3kYqavnSJQt/g2Ejhk=; b=0zqzA6ZjEQQGPQ6B2uFEq6dcbeZqj8Ff5hSWzwKSUFI2w/ChkLNdbWJ0uRMdekzr7W WkypKRC8FLaQ24VsPZepVgeNlBRxlgPuKakb9pcRC14WBLxYugDUmpme0tZKniyyzN/i zb6GnSu1/6jymEFLuicJBH1dB2miF/4yH4scguh1f5F+VOHgzvtDmUQoTJYojs/KqUxe 1KPD41AgH7ZNcUcJW+csMEsdDCN+OWXpiJ76DIraqp26Oa59CxTBPEK2u57RJZlW47o5 M9g2yvND+udJNe39lNWWB7yuqVf5OmexMHwEJpSaIVv5ijelQq9Rg1DyvLbPUYdC4lBs CUrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MCdN4hXf; 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 gv25si8222683ejb.209.2019.10.23.03.03.40; Wed, 23 Oct 2019 03:04:08 -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=MCdN4hXf; 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 S2404232AbfJWJ7U (ORCPT + 99 others); Wed, 23 Oct 2019 05:59:20 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:22616 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390982AbfJWJ7R (ORCPT ); Wed, 23 Oct 2019 05:59:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571824756; 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=H97WqW0j/xwCI0yXKzrYyNUvs3kYqavnSJQt/g2Ejhk=; b=MCdN4hXfBjdu/qOzV2xYoDbfT7S1bjKm6dOg9hOFFoVH7fZoviD/PFjl9y9XeuTiYWaFuv JQN5wPONuEg2PsmJ3IDOkbr+VEIQqL9MM2PzpR6rQBWk6g3vx6zrFHOGCScWDOaEJHLRII 7SX0UA60uargRzBtW69ieNs9S5hMkqw= 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-104-NVp_limcMRycUX3lsogTWA-1; Wed, 23 Oct 2019 05:59:15 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D644C476; Wed, 23 Oct 2019 09:59:13 +0000 (UTC) Received: from krava (unknown [10.43.17.61]) by smtp.corp.redhat.com (Postfix) with SMTP id 33879589B; Wed, 23 Oct 2019 09:59:11 +0000 (UTC) Date: Wed, 23 Oct 2019 11:59:11 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, linux-kernel@vger.kernel.org, jolsa@kernel.org, eranian@google.com, kan.liang@linux.intel.com, peterz@infradead.org, Andi Kleen Subject: Re: [PATCH v2 4/9] perf affinity: Add infrastructure to save/restore affinity Message-ID: <20191023095911.GJ22919@krava> References: <20191020175202.32456-1-andi@firstfloor.org> <20191020175202.32456-5-andi@firstfloor.org> MIME-Version: 1.0 In-Reply-To: <20191020175202.32456-5-andi@firstfloor.org> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: NVp_limcMRycUX3lsogTWA-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 Sun, Oct 20, 2019 at 10:51:57AM -0700, Andi Kleen wrote: SNIP > +} > 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; why not use cpu_set_t directly? jirka