Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5661618imm; Mon, 27 Aug 2018 01:51:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZIFsAXBpzxLGGQc4drUPqXfwHbuk5pIAHsAsE0jmB2qcbrnya6lYPV1PT0fndYmoWbnX+4 X-Received: by 2002:a63:352:: with SMTP id 79-v6mr11598190pgd.112.1535359865579; Mon, 27 Aug 2018 01:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535359865; cv=none; d=google.com; s=arc-20160816; b=U1d63tVbLhs9ELykdoXW17IxEs3izG+c/2LwWmshhINcjRS5rWC9Wic/JdgIHiJNF6 slSOjytNfywaL1MNZIcMq1a3/nSOnEPXVP0qsoPqe+lbQSFUXdYx9XxCvnK0Sa0YslEm YXhcPZnu72TBLZuZ94BEXO120PwKn/ReQKzW3HrzEjGLxfSfI+qMYV573b7ldOFUKlA9 jhexwDNvvpQmqLkVDFEuhk1RADE9pgT173F9ih+lD9gFolXzjZN2eSKb5b4vvtafhmW7 ko+q7j+mC97FLudosETsrfk+HBxFE2xziW1hbJ7iWDcBNS8lSecyUVJ3qzmqqgdDnutd hoKQ== 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 :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=bc50zufaTLH+SmwA6whM0/W8Rhmm2gdcy1m4gIYhi9s=; b=nSQs/vxwSdcz5VIHtuerxjPsO2bJ4zuQfzhJ6ey45ylCJIzv33/E/C5WOsG854JVDd KJsY1+3N/hMzDawZZ2qw2ex9TYuHL1rZWgAhOoJ4/yeV9T6Uye4gZtDaP3ZyIcwsFX5P CTBb60QMsGRbuW4lVKdcETFSTPua/r4JW+EfEEfF9Zv5hvCcSgb+GVuj/MuzRno3IOEl zqdiJWG8VR8liishiFEKbKGlNLklV4zvIzJAHMxbt5G/2JmH/6NzR6p1qRYvayUXktJD n3XXTJMojg8KWJH2MFRFOlDFXL+7FlKd1LPP1r9C+BvPa/avwtEDKhR+ytQ/ALywOmgz ZETw== ARC-Authentication-Results: i=1; mx.google.com; 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 h1-v6si13597502pld.152.2018.08.27.01.50.50; Mon, 27 Aug 2018 01:51:05 -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; 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 S1727199AbeH0MfQ (ORCPT + 99 others); Mon, 27 Aug 2018 08:35:16 -0400 Received: from gate.crashing.org ([63.228.1.57]:59045 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726802AbeH0MfQ (ORCPT ); Mon, 27 Aug 2018 08:35:16 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w7R89p6x007276; Mon, 27 Aug 2018 03:09:52 -0500 Message-ID: <4ef8a2aa44db971340b0bcc4f73d639455dd4282.camel@kernel.crashing.org> Subject: Re: [PATCH 3/4] mm/tlb, x86/mm: Support invalidating TLB caches for RCU_TABLE_FREE From: Benjamin Herrenschmidt To: Nicholas Piggin , Peter Zijlstra Cc: Will Deacon , Linus Torvalds , Andrew Lutomirski , the arch/x86 maintainers , Borislav Petkov , Rik van Riel , Jann Horn , Adin Scannell , Dave Hansen , Linux Kernel Mailing List , linux-mm , David Miller , Martin Schwidefsky , Michael Ellerman Date: Mon, 27 Aug 2018 18:09:50 +1000 In-Reply-To: <20180827180458.4af9b2ac@roar.ozlabs.ibm.com> References: <20180822155527.GF24124@hirez.programming.kicks-ass.net> <20180823134525.5f12b0d3@roar.ozlabs.ibm.com> <776104d4c8e4fc680004d69e3a4c2594b638b6d1.camel@au1.ibm.com> <20180823133958.GA1496@brain-police> <20180824084717.GK24124@hirez.programming.kicks-ass.net> <20180824113214.GK24142@hirez.programming.kicks-ass.net> <20180824113953.GL24142@hirez.programming.kicks-ass.net> <20180827150008.13bce08f@roar.ozlabs.ibm.com> <20180827074701.GW24124@hirez.programming.kicks-ass.net> <20180827180458.4af9b2ac@roar.ozlabs.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-08-27 at 18:04 +1000, Nicholas Piggin wrote: > > Yes.. I see that. tlb_remove_check_page_size_change() really is a rather > > ugly thing, it can cause loads of TLB flushes. Do you really _have_ to > > do that? The way ARM and x86 work is that using INVLPG in a 4K stride is > > still correct for huge pages, inefficient maybe, but so is flushing > > every other page because 'sparse' transparant-huge-pages. > > It could do that. It requires a tlbie that matches the page size, > so it means 3 sizes. I think possibly even that would be better > than current code, but we could do better if we had a few specific > fields in there. More tlbies ? With the cost of the broadasts on the fabric ? I don't think so.. or I'm not understanding your point... Sadly our architecture requires a precise match between the page size specified in the tlbie instruction and the entry in the TLB or it won't be flushed. Ben.