Received: by 10.223.176.5 with SMTP id f5csp3102102wra; Thu, 1 Feb 2018 10:46:44 -0800 (PST) X-Google-Smtp-Source: AH8x225wDY3kYmNOtkn6c7owvKk6F4aQ1BlAat1LzZtVc7HTFyEgbwBR+y/HcUfa9ft5kbmcqFxR X-Received: by 10.99.116.23 with SMTP id p23mr29638349pgc.60.1517510804825; Thu, 01 Feb 2018 10:46:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517510804; cv=none; d=google.com; s=arc-20160816; b=dlCtVM491ETTMhgxtawDiaTwcvrxxjz2/zoaSUNuvrWhr26xBSLP7now/bbt7TdtP4 uHxiJurv6e0I+QFA3QA0UsYnlYhzhTTrbhQSi8dW0RzFjIChAqqfwxqv/D3oyb6SGas2 JOYggX/fnYxPaYIstg/YGpMoIKk2HcGBcAYid31giXnygQfVZ+c25muHCUtHs4cA6u5t 64u0PDIq2oMqriNCYrUWJzBEET6n0wLXdMGURdpMqFvtEmeEAgF/g1WjKTT32NRS6pwU sUlJrTJql3jPlX8v7sPfsgB13xTG3tl6o2w/ITx5IjxmKAGsdO2exxFgBk9XlKe5xdPN McSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature :arc-authentication-results; bh=ZldLUz4XBedZnyO/t7IjNCLwxDKFzvSxxlHwwyU4UDY=; b=WUX/XyiLqUtHaV+nBKbxOO8ZiXS1y0LwUz2jCNO4KEPXgm1AwdLO+o3H+Dec2SRRNg 7WZ/Zcv9XIqIKZXbkFD6MEkiaN4QIzSRArF6Q4UVlhoVN/A7YcIsGYV+XRidicBoOzQ/ 2MXTSlTYyI52SPf4DZIR8e7ybIFY7eym226aHWifGDvsz7afWlO+CddNDV/VUKJIi3hV +N9aOB9QI0nEiNq2RHBVdyMUZZTFEW3qheTeEP+l/SrG3370FVsS8G1pKxEpAnqXVg4P 1Ad9njnGbb9mQn3uf4ayn1eAvB6kcEKdJnPmg7nuOjUgtLsvOh1vTtZHjISfNDWaA5Na y4Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dq2qCbt+; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5-v6si150276plz.426.2018.02.01.10.46.29; Thu, 01 Feb 2018 10:46:44 -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=@gmail.com header.s=20161025 header.b=dq2qCbt+; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752837AbeBASqF (ORCPT + 99 others); Thu, 1 Feb 2018 13:46:05 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35389 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751988AbeBASqB (ORCPT ); Thu, 1 Feb 2018 13:46:01 -0500 Received: by mail-wm0-f54.google.com with SMTP id r78so7711376wme.0 for ; Thu, 01 Feb 2018 10:46:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ZldLUz4XBedZnyO/t7IjNCLwxDKFzvSxxlHwwyU4UDY=; b=dq2qCbt+lBT4XqHpOLltrmg8Dwl99DOXX3Y4nWQoOk9L1Uu/Q/PS7/Y4ZfT35+0ZPa Z7/bHI+PZvAhACEYBxp+NnXmirbq0UjI+KJve40wREWgPv4Ns+0FX0+/buzqYrGrvZje akLjjtiJ7m9C25HEKfYmS0dOzcPkdeh/bfX+NAgGJbMSZd/WrT5P3Tj4O16aGNWm/oo/ Anubv4MyCCVkjgkIqkwnscdi4+C8F4LZU1w1ajERUnZoJ1z0r2d0yU9PYal09lSog+zN dhYggrgEbLC1jcwf1st3CeIQKPC7DzWWdWGAK9LU04FIHbAcvjX968KztnMaf8HRa2lD tbzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ZldLUz4XBedZnyO/t7IjNCLwxDKFzvSxxlHwwyU4UDY=; b=eeMF6SqBlt+XR0hkutHGRfju3IdmFluuZ6ooD9LGoA71GmKdLnezh/w7udjSdZJ8yE J9vtHqUo4HnOLTo2ouqdkIr3wMcrZfPmWGEe2ujkAnq25rvexe3NjyjSak4Ppe9Yzq/C ozwOElfkhf69khFMP2dufaukTYTAZKN6w3yNv2brzBFeka6VYigsYmwhrBnBCyMosfiU VTWUZbamMuI3lwnW2kMBhRwsLiYAquJYW56Ow1v5B8+Ehw3NXPosiUJUR+iBrqin6F4w YWmsSL7baE3b8GuAOxNjY3xJpISNQCPQKXi683wxVCyv9zWtBqv0lemIbnLTwl/YWpCp LHTw== X-Gm-Message-State: AKwxyte8xU/K9jAl2xxZ78XIUOeTYiuyiHPM0tZKekQyKFnE29ESgUBb ERZTvAkXIGq1bi8mEt29ZlInWK21 X-Received: by 10.80.221.3 with SMTP id t3mr61494551edk.192.1517510760386; Thu, 01 Feb 2018 10:46:00 -0800 (PST) Received: from [10.2.101.129] ([208.91.2.2]) by smtp.gmail.com with ESMTPSA id 30sm297901edz.63.2018.02.01.10.45.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 10:45:59 -0800 (PST) From: Nadav Amit Message-Id: <95FB622E-4E2B-4EFC-998F-4A3522BA27BD@gmail.com> Content-Type: multipart/signed; boundary="Apple-Mail=_60404382-764F-4132-8ED9-DE5809D17D4A"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH] x86: Align TLB invalidation info Date: Thu, 1 Feb 2018 10:45:55 -0800 In-Reply-To: <20180201093847.GZ2269@hirez.programming.kicks-ass.net> Cc: Dave Hansen , the arch/x86 maintainers , Andy Lutomirski , "H. Peter Anvin" , LKML , Thomas Gleixner , Ingo Molnar To: Peter Zijlstra References: <20180131201118.1694-1-namit@vmware.com> <8bb352bc-4e1f-4e87-80e3-a8e65d618d2a@linux.intel.com> <0E65629C-0D7D-4602-A43D-B18E62F330A6@gmail.com> <20180201093847.GZ2269@hirez.programming.kicks-ass.net> X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Apple-Mail=_60404382-764F-4132-8ED9-DE5809D17D4A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Peter Zijlstra wrote: > On Wed, Jan 31, 2018 at 09:38:46PM -0800, Nadav Amit wrote: >=20 >> I used ftrace to measure the execution time of = flush_tlb_func_remote() on a >> 2-socket Haswell machine, using a microbenchmark I wrote for some = research >> project. >=20 > However cool ftrace is, it is _really_ bad for such uses. The cost of > using ftrace is many many time higher than any change you could affect > by this. >=20 > A microbench and/or perf is what you should use for this. Don=E2=80=99t expect to see a remote NUMA access impact, whose cost are = few 10s of nanoseconds on microbenchmarks. (And indeed I did not.) Each iteration = of #PF - MADV_DONTNEED takes several microseconds, and the impact is lost = in the noise. You are right in the fact that ftrace introduces overheads, but the = variance is relatively low. If I stretch the struct to 3 lines of cache, I see a = 20ns overhead. Anyhow, I think this line of code got more than its fair share = of attention. --Apple-Mail=_60404382-764F-4132-8ED9-DE5809D17D4A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE0YCJM4pMIpzxUdmOK4dOkxJsY0AFAlpzYGMACgkQK4dOkxJs Y0AjLg//UxeP4uEjeGONOHuutXmuNK8dtDwZ+h79vjBw5wha9Bq0GmPobCOziq8x ezK3PSO9L/VYqyZNJJvpm6NWTEpf9P73003R7w0Vul0h5cUz9kjPPNl5TOZrvA4T phQ6eCeNJ2c/zMqEqTKAXo76XQlBhb2Z6qY6xW8I9Fu1k3pCBRnLMwevlE4xlCjw ARNubo0AW3o5vyXu7r00eK5C5dqDAgGiLdnZSK2TOPdPSAcHlNYsewNUET2MDzQT 43/sa43ezPJv0T60vddHS340cMR/CZUbDf5K2wuWVnEV/qk8LBPHPmZ2s7S2/49z JKfqa6nbfen5xCV+pBinW4JvK8DKHr87WEc5LENEz1NlrkJzdDmbtKr3kIrWYiWd zPf0mxCuSiyZYHTOjStRL26wpjdyNnNRp5SLGvZwQd5cB2CX+oV6qNr73Mm1FC2P omS1k55HZJDCMoPEA3xVZ7AVZtaHQC9T4tc99rnTiOtCNH8jFl7bLvaCMEZTUjru fBGoxgaPrL04n6cFafs9VmToYuoTBjq7lFW44EAnmowHgnl8hAuLi5LBYObuef+i 9nSTDCy6iZiLdTE4mC4l9TszN6MOASX/1OGINMPrV5VS5AJx1HzVzXcSlEUcDMUq mbDhfXdXmAA2OS9C6g0CNnzQX1hAkwPofOlG7bNHQ9iy3vua86s= =BRsW -----END PGP SIGNATURE----- --Apple-Mail=_60404382-764F-4132-8ED9-DE5809D17D4A--