Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3028855imm; Fri, 24 Aug 2018 09:17:21 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaISU/2OxvtD+yMWsyf2CC/jdybU+99LLcv+wY9zMK5B/RkGfgbd2jpCj5m4aWSud+p5FNL X-Received: by 2002:a62:c218:: with SMTP id l24-v6mr2693389pfg.185.1535127441250; Fri, 24 Aug 2018 09:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535127441; cv=none; d=google.com; s=arc-20160816; b=uhC87B/qXSCiRPyW52I2loCRDge7FCDWdODgJDcVdYoKzZwY2+7GLorbeEkkcIbWlC GCGupCFgZDSrSuv1kanEv+Spb6tRaMFUWX8VAe5I6PmVsvCDF8UxRSR5B6GzRPBw68dY CYGP6aTCQbaO0Dk5lrdjqUl7YX+d1RBWviF45pGszA/r70ZJl5PFoDO5S0qHfPaARXSZ orLiv0//ZWpANnvBe3LmVNdG4+Loj5ii/o2eYkPqQpnkSbYA2NPwErHLrM53/uKvhqC9 d/FgcPMUIpSZHdiBb7pMJyhl+ndv5neL7g2bqgAP6JjSEJFPp7oTVEaM9Q+3dHgeofw+ vTnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=8EI6Cmnn55rUrZk3eqlRIC883FRYLzC0/FwbAfAYvzM=; b=bcx4OneHBBgxvuPxbXH2PvRNkFNKe3FgBEprQDi+tomo7QqCaV+fD39aJFVBFnygiB QoBRjiO4EH5MockU8j7ZAqQvuBVsuFyIX130voH+CXtjC7c8oFl0HcIbyetgFW6edhHl j9GwpBftRcu6aKQpczUCIaNm2PWM6wpOej57+jadrkobb3YP3AMAjhfMIICI42w/Og6w evlNiWdAqnZD1sEpeOyY1A4OU8KE7ajFuXTF+i9UY3sqt17G+Ez4QIxrudobg7DUN7ck abkzhf5uXixHc62ZNETlPQksQuZ809I2CezHMAm6FdkOExkrgRDN5POfLfjQwIOJNxgH rznw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=YKTQQ7p6; 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 u13-v6si7271309pgg.263.2018.08.24.09.17.05; Fri, 24 Aug 2018 09:17:21 -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=@linux-foundation.org header.s=google header.b=YKTQQ7p6; 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 S1727072AbeHXTus (ORCPT + 99 others); Fri, 24 Aug 2018 15:50:48 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:54711 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbeHXTus (ORCPT ); Fri, 24 Aug 2018 15:50:48 -0400 Received: by mail-it0-f68.google.com with SMTP id l186-v6so2819629itb.4 for ; Fri, 24 Aug 2018 09:15:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8EI6Cmnn55rUrZk3eqlRIC883FRYLzC0/FwbAfAYvzM=; b=YKTQQ7p6v7WyBKA+MYZ7oidxJWR3bZ7c+T5ibTTrm8J3v175QBoJFPhKE7cVp+r27+ eMJG7S/01luwXz1YDL8CencEaxh9bY1ke7lzOvq2xPs6MYpt5F7dEiwmhYT3CepYuz5M aCHgqPSbI+FZzM5afue6N1Y1xB3QrA6vJ2+kA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8EI6Cmnn55rUrZk3eqlRIC883FRYLzC0/FwbAfAYvzM=; b=MpPBuMhxPx1MM73keoJvh/7CxZ98HG4Me/aB9yhE5axfFR/VVGEsLtIuXF0CCK8xD3 rEQvetZ6Kq19Pgc0EN97HatneQXA38d6yxxm9w4mK+KmUrBvSDO+/E+Rini7ZrhQHodJ Enjf9S9df4eSz0bwv9KWYJrapId/yAWzrmIfgS+xZb+iRGsSdE5iw199t46Hlt9U3Vrt Ar4QohQQyaZcjFy8xHRjp1kPjKkNLJAUZQYhBCrKw458NI9T2+IJxA6Wvn2GouYqngFf SHES+jkOWbDu6jZdiZghV3FdYKI2WReWZiaRf+zErJcMMG9NcMimaxAUNMxDDN4cigNQ AAfw== X-Gm-Message-State: APzg51AC0negtxhm13V1STvLlpwXwY2Aqs3ku1fnjE2kfr0bk7PUZCQA P2nHAhL3qE0v/enPxFdGP6dXRwJ5pPiJHIJStOM= X-Received: by 2002:a24:3046:: with SMTP id q67-v6mr2042613itq.9.1535127329127; Fri, 24 Aug 2018 09:15:29 -0700 (PDT) MIME-Version: 1.0 References: <1535125966-7666-1-git-send-email-will.deacon@arm.com> <1535125966-7666-4-git-send-email-will.deacon@arm.com> In-Reply-To: <1535125966-7666-4-git-send-email-will.deacon@arm.com> From: Linus Torvalds Date: Fri, 24 Aug 2018 09:15:17 -0700 Message-ID: Subject: Re: [RFC PATCH 03/11] arm64: pgtable: Implement p[mu]d_valid() and check in set_p[mu]d() To: Will Deacon Cc: Linux Kernel Mailing List , Peter Zijlstra , Benjamin Herrenschmidt , Nick Piggin , Catalin Marinas , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 24, 2018 at 8:52 AM Will Deacon wrote: > > Now that our walk-cache invalidation routines imply a DSB before the > invalidation, we no longer need one when we are clearing an entry during > unmap. Do you really still need it when *setting* it? I'm wondering if you could just remove the thing unconditionally. Why would you need a barrier for another CPU for a mapping that is just being created? It's ok if they see the old lack of mapping until they are told about it, and that eventual "being told about it" must involve a data transfer already. And I'm assuming arm doesn't cache negative page table entries, so there's no issue with any stale tlb. And any other kernel thread looking at the page tables will have to honor the page table locking, so you don't need it for some direct page table lookup either. Hmm? It seems like you shouldn't need to order the "set page directory entry" with anything. But maybe there's some magic arm64 rule I'm not aware of. Maybe even the local TLB hardware walker isn't coherent with local stores? Linus