Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1024337ybd; Wed, 26 Jun 2019 09:51:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqza8/JMx1DmV6mG+ojtlqwKyPm0Tz/x7jSpoZhIH6J0fu70oeiX4clUfr9EoGj7WgzxF7nx X-Received: by 2002:a63:60cc:: with SMTP id u195mr3856785pgb.13.1561567877673; Wed, 26 Jun 2019 09:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561567877; cv=none; d=google.com; s=arc-20160816; b=fdkmcpQehggWOpHzHXqL6K55c5tDQQIwSYbNEyCBsK03Ru0L4p2HFj3GssuZcbsFZG SFNxUbLprwQLdkhmR3brDv7/kgTdG5DUc15iIPO0N1MwaR7AZ96QGW+xsjrRgargDTuA 0P9T26gJ2gbBFyFFgz9/zrZGFN7qNVVdW863CfKNi8OmQxYrQJfL/b55SFfaTyxLcEQS vAF3vn9MR4o3t95UaBxfwQsCjifdWwjS3GjFZB7u1ECzQJ18l2P5ksq0zuvm+wv7xk1L ntL+PhX8zb1jdyEOIverNrg391bOTZFmU77uSC/tc5QA9Xw/yyEpmSOovgXPo7Q8lxGU yWrA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ZIEpGvaiyJBO1quuxqbqR1A/BIIK8w/lCvjKpxY+bRg=; b=cqBpPeIpdcYDU1gCAAwglkar900hzigNS5DbGLXZKiRQKOJo9ApfxH0oPQ7Woxxuzy piTKLLecpbutb0YDaAvO6+RUEBjS1+dCKEgnGXFBatXzUy3hKxvV4d7AkGhdAFGpP88x bGaNwPLu/Yl7tbmaDvv7ZRtcmcJVq9z5e/8e4nIvhIQQpA0z42U1pO/CcO3bHgW0W9E0 y0BZUGArW2WTfnyvwf3TdVDi3TbCvthdHM3JIN4/lyj1PQblv9ZwQTRYbp+kZBz1PN3P qEyo0ssWe2Z3g9eTvhgBP6wChG+nj2xvzLa73tqMa3sYcJZPaWLH9JvkbiWlTjJrsY5V pP4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="N/kQ6jvb"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y187si2016198pgb.480.2019.06.26.09.51.00; Wed, 26 Jun 2019 09:51:17 -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=@kernel.org header.s=default header.b="N/kQ6jvb"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726481AbfFZQuu (ORCPT + 99 others); Wed, 26 Jun 2019 12:50:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:41248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbfFZQut (ORCPT ); Wed, 26 Jun 2019 12:50:49 -0400 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A153921738 for ; Wed, 26 Jun 2019 16:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561567848; bh=S4Ncvx4sxZHwQdV7oXACPmmJ2PQLIIk4E9TaysZH9yc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=N/kQ6jvbBB9wubufo1QVUilhuPng0BCusrsq+oRdO3z0H9yjS1vyjXxx5Yi400p6X ElrnjCzr+Sh4FFAu170Q77gE2c4dj09PfIfZPzfVZm23KZ3RTk8Z+oz39Lvvp/aLW+ C8cKXwDkvHPe3T+aYhd+iIprDKXPyA6RnUS541Rc= Received: by mail-wr1-f50.google.com with SMTP id f15so3569902wrp.2 for ; Wed, 26 Jun 2019 09:50:48 -0700 (PDT) X-Gm-Message-State: APjAAAVbWK3z/UVQ9QZP2ECJZaLQjkww/ZjmCDqGWPrvY1RZQh6ThwhM I/Memmz5HtmRqqUN/rPydK174gaJGizv+z+zVoLj/Q== X-Received: by 2002:adf:a443:: with SMTP id e3mr4271982wra.221.1561567847240; Wed, 26 Jun 2019 09:50:47 -0700 (PDT) MIME-Version: 1.0 References: <20190613064813.8102-1-namit@vmware.com> <20190613064813.8102-6-namit@vmware.com> <86e04985-7884-3d33-c479-92614b4e4342@intel.com> <09591002-92C0-4D1D-AA4B-FB1C49661A59@vmware.com> In-Reply-To: <09591002-92C0-4D1D-AA4B-FB1C49661A59@vmware.com> From: Andy Lutomirski Date: Wed, 26 Jun 2019 09:50:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/9] x86/mm/tlb: Optimize local TLB flushes To: Nadav Amit Cc: Andy Lutomirski , Dave Hansen , Peter Zijlstra , LKML , Ingo Molnar , Borislav Petkov , X86 ML , Thomas Gleixner , Dave Hansen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 26, 2019 at 9:39 AM Nadav Amit wrote: > > > On Jun 26, 2019, at 9:33 AM, Andy Lutomirski wrote: > > > > On Tue, Jun 25, 2019 at 2:36 PM Dave Hansen wro= te: > >> On 6/12/19 11:48 PM, Nadav Amit wrote: > >>> While the updated smp infrastructure is capable of running a function= on > >>> a single local core, it is not optimized for this case. > >> > >> OK, so flush_tlb_multi() is optimized for flushing local+remote at the > >> same time and is also (near?) the most optimal way to flush remote-onl= y. > >> But, it's not as optimized at doing local-only flushes. But, > >> flush_tlb_on_cpus() *is* optimized for local-only flushes. > > > > Can we stick the optimization into flush_tlb_multi() in the interest > > of keeping this stuff readable? > > flush_tlb_on_cpus() will be much simpler once I remove the fallback > path that is in there for Xen and hyper-v. I can then open-code it in > flush_tlb_mm_range() and arch_tlbbatch_flush(). > > > > > Also, would this series be easier to understand if there was a patch > > to just remove the UV optimization before making other changes? > > If you just want me to remove it, I can do it. I don=E2=80=99t know who u= ses it and > what the impact might be. > Only if you think it simplifies things. The impact will be somewhat slower flushes on affected hardware. The UV maintainers know how to fix this more sustainably, and maybe this will encourage them to do it :)