Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp55424imu; Thu, 8 Nov 2018 14:41:49 -0800 (PST) X-Google-Smtp-Source: AJdET5dvMuvhilgxcft6T40qOHV2ZMufra+4f90eXgicGRbAWWZItwh81rbIcSRKbWJbBNlXXM9p X-Received: by 2002:a63:441e:: with SMTP id r30mr5444245pga.128.1541716909921; Thu, 08 Nov 2018 14:41:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716909; cv=none; d=google.com; s=arc-20160816; b=bWo3wqfNMqBI/6kS6KY2HREpEt6/FaRKk2PeVNqR3amG7buPqKNSR4pQBRCsY1tm3d xP/404vrCtFy0RvJtUNhFJ8afInzJw5u3DmsUzxotMhc6r/ZHEJIEf4UilU77hkGiJkU U+3KJZCzGmMp0LIo6qY6WLvfL/Kn+3Hn/wCbMQ34LgFi4i3QY2d9pnq/0oF5FLkw2Kaf 0SEvVHyHze7Ai/KCtLahsN6RMbbTAwdHIRikqRJZ/ZxvwgBighi75EpigLaNUARU2jrg yalIbN19GlHDtLmuYXFTLyCrjSHozAkdrK9KXY+VkJ9CN8/Y/jFGWQrzEzgdEtEhUW2/ nZ6A== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=INccnvX92wM3b55DeGFMSdF/lm8cIHTNGIxvdbcOGtk=; b=TcbEdKuODTvUB4UFEg9fQoRAV2vTTnSRiu51rTFPI/T4Z5eZWyWiEi6aHjuZmWIyOG tzONNyWmriD53F8j9uJuJJ780I3qzFBLSM/n3phVsjmCeS+cr+sBy4s0SxeViSkRQzik vFFwJF1QwtFXlNTgbWx2YezE5/FdUNMxiobrfuVnv5Q3T22OSPhyRi7lhW3bzzFBDnMb ofle6zY4G/N2v3pI+OX8SRB/mKto+wi0vVAl+H/wBFzG49psDO4Uyp0CRjX0N/qrodd9 042rYbP9srt//0Hr/2ewtWZOFxdf8lvkBU+3sQ76GA0UyDATJdf5PWfNXIUQ/u62dZ6S flvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="AeZaPn/B"; 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 u19-v6si5956053pfj.137.2018.11.08.14.41.34; Thu, 08 Nov 2018 14:41:49 -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; dkim=pass header.i=@kernel.org header.s=default header.b="AeZaPn/B"; 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 S1729061AbeKIHdm (ORCPT + 99 others); Fri, 9 Nov 2018 02:33:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:49644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728976AbeKIHdl (ORCPT ); Fri, 9 Nov 2018 02:33:41 -0500 Received: from localhost (unknown [208.72.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD6F321104; Thu, 8 Nov 2018 21:56:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714173; bh=HRT0bCCN9wABFP7MvpsVPJAKwFcOpA3aeaP4+cqP/p8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AeZaPn/BITZthm7IPOw94hk9b0sq2VmnFMmNeSIHm3kOEa2FFDl6ePrHerkNyReWK kXnw3DwtXi07XjB2Yhkk/9K3vluYmUJHpOtHxL6N1WK8wkF0i3yjEWY0Rumct9dZqn l9nAG2BTiOVjtLdH6h6DdHXPipDNe8u3rFVQurF8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srikar Dronamraju , Ingo Molnar , Jiri Olsa , Masami Hiramatsu , Namhyung Kim , Vinson Lee , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 3.18 097/144] perf bench numa: Fix to show proper convergence stats Date: Thu, 8 Nov 2018 13:51:08 -0800 Message-Id: <20181108215104.660939658@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215054.826084593@linuxfoundation.org> References: <20181108215054.826084593@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 2b42b09b88c831ba4da2d669581dde371c38c2af ] With commit: e1e455f4f4d3 (perf tools: Work around lack of sched_getcpu in glibc < 2.6), perf_bench numa mem with -c or -m option is not able to correctly calculate convergence. With the above commit, sched_getcpu always seems to return -1. The intention of commit e1e455f was to add a sched_getcpu in glibc < 2.6. Hence keep the sched_getcpu definition under an ifdef. This regression happened occurred between v4.0 and v4.1 Signed-off-by: Srikar Dronamraju Acked-by: Ingo Molnar Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Vinson Lee Fixes: e1e455f4f4d3 ("perf tools: Work around lack of sched_getcpu in glibc < 2.6") Link: http://lkml.kernel.org/r/20150624111004.GA5220@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/cloexec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c index 85b523885f9d..2babddaa2481 100644 --- a/tools/perf/util/cloexec.c +++ b/tools/perf/util/cloexec.c @@ -7,11 +7,15 @@ static unsigned long flag = PERF_FLAG_FD_CLOEXEC; +#ifdef __GLIBC_PREREQ +#if !__GLIBC_PREREQ(2, 6) int __weak sched_getcpu(void) { errno = ENOSYS; return -1; } +#endif +#endif static int perf_flag_probe(void) { -- 2.17.1