Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1580688ybp; Wed, 9 Oct 2019 16:53:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzboNP888lWPsl+R+dYh2nJdADC/vldGQhcagZgFzi2XB6AapSxsG5n24Zhz0wHSHLrwkb X-Received: by 2002:a17:906:31d4:: with SMTP id f20mr5341860ejf.265.1570665230510; Wed, 09 Oct 2019 16:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570665230; cv=none; d=google.com; s=arc-20160816; b=njOoVy574Ijv7s0wrxU/VSJi0doE85gc/GG20czHeVE6F/CRZcXyb4fYCFL8DMdCGY X9OgqLXGuWenRArkcqWp0lmrFwcRPt60RwRvwMtwgZXxyu8BIWwzC5B7U77uvDh4yR92 Bwve2A9cYicXJkMvE3REqbn7AtPoOkGuc6hZIRc8EFi+HZUiCr0fRdfWZaIb5cRZh4Ce K+Xm+egQxffZW2/sTtmHErFEZ9OcbkxW+nMoJKryDQrnOk4YAWXdJBYsbyudzFxNnkTe 7/kb8KW8kRQgunhMxDOVQU21e5I1JQak9fDe5Y+SI59942Alha1ElyAsyhZr3HdULXNe nC8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:references:cc:to:from:subject :dkim-signature; bh=OVCTjLF7p2c8GvT4QhkRVrPyPfIj/upH/PEdgkhp5O0=; b=s2Pk9GfsJxuGVrSr2rkB1E4zzAckcDHrkwpKq7SG23uvu2l3rDnn8EHuvbct/7DkCC 7a7f0JVzvQC8Z/hesOQyWPoGtbvwchLATFvLiQEbMt+6OPSgwbqI9acZY09K7lBQBnZB /cq3qR8Qc4gP4Ke4JNSW8U8B910PU6QLDgVO6UFTMPwG2xGlR6SDjOWLX4up8eNQoYkl NJAUxPFUQ7k8izbMW5zmM5LLK9ugl7Akk0DM1mAR9N99O5AM8rGMZa+tgM+s4W7zLvFJ 4EiEwlfENymEKnd81ywe/plZoSMYYVRCspBUkQiuBVtMC8ibd/QAmL1dMy1HNj14CO78 Gpzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=GeA+SrrO; 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 h13si1998030edw.348.2019.10.09.16.53.27; Wed, 09 Oct 2019 16:53:50 -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=fail (test mode) header.i=@shipmail.org header.s=mail header.b=GeA+SrrO; 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 S1732388AbfJIXu7 (ORCPT + 99 others); Wed, 9 Oct 2019 19:50:59 -0400 Received: from ste-pvt-msa1.bahnhof.se ([213.80.101.70]:26992 "EHLO ste-pvt-msa1.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730955AbfJIXu7 (ORCPT ); Wed, 9 Oct 2019 19:50:59 -0400 Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa1.bahnhof.se (Postfix) with ESMTP id 400B83F839; Thu, 10 Oct 2019 01:50:56 +0200 (CEST) Authentication-Results: ste-pvt-msa1.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b=GeA+SrrO; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Flag: NO X-Spam-Score: -2.099 X-Spam-Level: X-Spam-Status: No, score=-2.099 tagged_above=-999 required=6.31 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from ste-pvt-msa1.bahnhof.se ([127.0.0.1]) by localhost (ste-pvt-msa1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ibc0yJzAbMJS; Thu, 10 Oct 2019 01:50:55 +0200 (CEST) Received: from mail1.shipmail.org (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) (Authenticated sender: mb878879) by ste-pvt-msa1.bahnhof.se (Postfix) with ESMTPA id CB6493F835; Thu, 10 Oct 2019 01:50:50 +0200 (CEST) Received: from localhost.localdomain (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) by mail1.shipmail.org (Postfix) with ESMTPSA id 187533600A4; Thu, 10 Oct 2019 01:50:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1570665050; bh=/mXBG9fUSN09uVUSznrWUrKQ++9rbFkU/mzTR08+/2s=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=GeA+SrrOMNr6lhvJ2Q2/28UsCPDub1BZHgWz7m2Vu71tMVhQutH2OkL+5nlJ0ZoBZ l9thmhwXVC4yToimTkvopjgKI3JUiihZt36pN9rXKZp8+GGbmtoYcf0R0KEFUAR1bn BKzVILbWZSfanwjBHnBP10es3FeULLF0MnsWrJ6U= Subject: Re: [PATCH v4 3/9] mm: pagewalk: Don't split transhuge pmds when a pmd_entry is present From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28VMware=29?= To: Linus Torvalds Cc: Thomas Hellstrom , "Kirill A. Shutemov" , Linux Kernel Mailing List , Linux-MM , Matthew Wilcox , Will Deacon , Peter Zijlstra , Rik van Riel , Minchan Kim , Michal Hocko , Huang Ying , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= References: <20191008091508.2682-1-thomas_os@shipmail.org> <20191008091508.2682-4-thomas_os@shipmail.org> <20191009152737.p42w7w456zklxz72@box> <03d85a6a-e24a-82f4-93b8-86584b463471@shipmail.org> <80f25292-585c-7729-2a23-7c46b3309a1a@shipmail.org> Organization: VMware Inc. Message-ID: <54e65cdd-1b6a-d4d6-0305-dcb36bc49c41@shipmail.org> Date: Thu, 10 Oct 2019 01:50:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <80f25292-585c-7729-2a23-7c46b3309a1a@shipmail.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/10/19 12:30 AM, Thomas Hellström (VMware) wrote: > On 10/9/19 10:20 PM, Linus Torvalds wrote: >> On Wed, Oct 9, 2019 at 1:06 PM Thomas Hellström (VMware) >> wrote: >>> On 10/9/19 9:20 PM, Linus Torvalds wrote: >>>> Don't you get it? There *is* no PTE level if you didn't split. >>> Hmm, This paragraph makes me think we have very different >>> perceptions about what I'm trying to achieve. >> It's not about what you're trying to achieve. >> >> It's about the actual code. >> >> You cannot do that >> >>> - split_huge_pmd(walk->vma, pmd, addr); >>> +               if (!ops->pmd_entry) >>> +                       split_huge_pmd(walk->vma, pmd, addr); >> it's insane. >> >> You *have* to call split_huge_pmd() if you're doing to call the >> pte_entry() function. >> >> I don't understand why you are arguing. This is not about "feelings" >> and "intentions" or about "trying to achieve". >> >> This is about cold hard "you can't do that", and this is now the third >> time I tell you _why_ you can't do that: you can't walk the last level >> if you don't _have_ a last level. You have to split the pmd to do so. > It's not so much arguing but rather trying to understand your concerns > and your perception of what the final code should look like. >> >> End of story. > > So is it that you want pte_entry() to be strictly called for *each* > virtual address, even if we have a pmd_entry()? > In that case I completely follow your arguments, meaning we skip this > patch completely? Or if you're still OK with your original patch https://lore.kernel.org/lkml/CAHk-=wj5NiFPouYd6zUgY4K7VovOAxQT-xhDRjD6j5hifBWi_g@mail.gmail.com/ I'd happily use that instead. Thanks, Thomas