From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6904DC433E1 for ; Thu, 13 Aug 2020 21:45:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 204D020768 for ; Thu, 13 Aug 2020 21:45:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=jrtc27.com header.i=@jrtc27.com header.b="bNWbLyoO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 204D020768 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jrtc27.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A8F778D0002; Thu, 13 Aug 2020 17:45:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A3FB56B0023; Thu, 13 Aug 2020 17:45:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92EFB8D0002; Thu, 13 Aug 2020 17:45:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id 7D93A6B000D for ; Thu, 13 Aug 2020 17:45:02 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 45915181AEF1A for ; Thu, 13 Aug 2020 21:45:02 +0000 (UTC) X-FDA: 77146876044.02.pigs76_280c9d926ff7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id 1357D10095E1C for ; Thu, 13 Aug 2020 21:45:02 +0000 (UTC) X-HE-Tag: pigs76_280c9d926ff7 X-Filterd-Recvd-Size: 5008 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Thu, 13 Aug 2020 21:45:01 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id k8so6296807wma.2 for ; Thu, 13 Aug 2020 14:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jrtc27.com; s=gmail.jrtc27.user; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=p8TH69X43ZoFa7TDNNdb8nvvKKgned+SBGLxGIyaQIk=; b=bNWbLyoOu82fU7kVnT3ZayQDi98ttuUf/Yw4TjLRLSjcsGQESo6+Kl2izVidCwWQMA u22NvhLahNT9G6BLdZ4TlzurmlKb7DVZyTdowFw8e3XCWbaUwqpIe87i4nkdc/0FxAaC 8JOMIARo5bbz9qzHLiuemhmoA3vnT2Xm0aNne+s2hwiEvnFt123bm0csqj6SjyUp9wGC qnrpr+6vnn1MhxU/7LC0hn4on80/7lSHfsGXw7kM95iBCy4vjVayFK3J9Yt1wDth4lMD L78DRFX3jtXzdmEj/4QLPWajkjc7gDH74pvy5yMnzlxlWbSHkxaq0yFr1dG5PfxReu2M WUxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=p8TH69X43ZoFa7TDNNdb8nvvKKgned+SBGLxGIyaQIk=; b=ccbUL8qmYqj8xrd9+eP4aT2QVdY9/MfwHb8YbKQJriYUORzTuPQl9N0eE8kYKL1/Cu 42Uh1gEmLciOC7kSdahATeLOJU0ZEFee+t/ZUwP5luBhh+2R6m0gCklxeKh5byr2nRTm rf1q63uvoaTrzuvj0T72kxjIV02Fu1aoxFfDP53CksRZyFJ8b2LeK4kpLFcWDJQ3kWET PucKla/avcSM1QvqFo7cEqdTb3gbjqDulvnBsqAZEzhT4xft2BIOipo4FVi8gGElIyDH 5gw6eJlQ5k2nkr3SzI3uX80a9FP3qC7WvNGJjBEiKwCnyunKQw8k3M73Wzs4BS2dEPSZ 0sZQ== X-Gm-Message-State: AOAM531cN4d7pLof3Nq5WQDbR6020tSThCedZhOM7ny468HoLznDacUn W5iZSKt2vt5wF8c/kqjcLfsGhw== X-Google-Smtp-Source: ABdhPJwx2+0bEDzLcaPS2qe2PUICAIhLX12rlbl/1ppV9mFyJdhGqiyaa+dqAD/Ocj/4C/vcQ3D5bg== X-Received: by 2002:a7b:c150:: with SMTP id z16mr5739020wmi.136.1597355100329; Thu, 13 Aug 2020 14:45:00 -0700 (PDT) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id c14sm11458522wrw.85.2020.08.13.14.44.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2020 14:44:59 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: [PATCH v5] arch/ia64: Restore arch-specific pgd_offset_k implementation From: Jessica Clarke In-Reply-To: <20200813213631.GQ17456@casper.infradead.org> Date: Thu, 13 Aug 2020 22:44:58 +0100 Cc: Mike Rapoport , John Paul Adrian Glaubitz , Tony Luck , linux-ia64@vger.kernel.org, Anatoly Pugachev , Sergei Trofimovich , Linux MM , Frank Scheiner , Mike Rapoport Content-Transfer-Encoding: quoted-printable Message-Id: References: <20200813205521.5405-1-rppt@kernel.org> <20200813213631.GQ17456@casper.infradead.org> To: Matthew Wilcox X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 1357D10095E1C X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000061, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 13 Aug 2020, at 22:36, Matthew Wilcox wrote: >=20 > On Thu, Aug 13, 2020 at 11:55:21PM +0300, Mike Rapoport wrote: >> +/* >> + * In the kernel's mapped region we know everything is in region = number 5, so >> + * as an optimisation its PGD already points to the area for that = region. >=20 > Is it actually an optimisation? Are there any benchmarks where this > makes any difference whatsoever? Or should the comment be closer to >=20 > /* ia64 is gratuitously different. Cope with it. */ >=20 > I might suggest that pgd be changed to be the same as every other pgd > in the system, and every other architecture. IA-64 is just weird. There's an optional hardware page table walker, and two different options for how to use it within that, short-format and long-format. My understanding is that Linux uses the short-format, and that means that the VHPTs (Virtual Hashed Page Table) are per-region. My assumption therefore is that the kernel's PGD is a completely separate allocation from the userspace ones, and it's not just a case of "moving the pointer back to the start" but that "that is all there is", so unifying the two would be a significant undertaking that avoids one special case at the cost of invasive refactoring and a performance hit by duplication and/or unused space. My knowledge of IA-64 translation is pretty limited, that's about all I know (and this likely has mistakes in it), but I know enough to avoid finding out too much more. Never make the mistake of assuming IA-64 can be made to look like any other architecture :) Jess