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=-3.9 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 DD20AC433E3 for ; Fri, 21 Aug 2020 19:19:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A014F20735 for ; Fri, 21 Aug 2020 19:19:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="SofWc/w6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A014F20735 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2B80B8D0076; Fri, 21 Aug 2020 15:19:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 241948D0002; Fri, 21 Aug 2020 15:19:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 109D58D0076; Fri, 21 Aug 2020 15:19:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0042.hostedemail.com [216.40.44.42]) by kanga.kvack.org (Postfix) with ESMTP id EB9428D0002 for ; Fri, 21 Aug 2020 15:19:03 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9E982180AD830 for ; Fri, 21 Aug 2020 19:19:03 +0000 (UTC) X-FDA: 77175538566.12.spade13_1300aa02703b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id D050F1802B569 for ; Fri, 21 Aug 2020 19:19:00 +0000 (UTC) X-HE-Tag: spade13_1300aa02703b X-Filterd-Recvd-Size: 4969 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Aug 2020 19:19:00 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id 185so3027528ljj.7 for ; Fri, 21 Aug 2020 12:19:00 -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=DLc84kj5PHVUSiFGEP5mfzNqVCypKwLtWPaDrgaberY=; b=SofWc/w6t4rEsc85RaLfw4+1oCNKhS2jGDmsKj708JnMxQaUL81Q5yOWX5EhAMzU+x Cb3KyXSNMzLbsgJPGamhAP2iMjt3UL8rroxFzqL7p6C5UBNeY6HNa3Jd1zJI2GavW46Q WhVw+1qcn3yzbaRWJ0lfgO2uTu43gklL+LpRw= 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=DLc84kj5PHVUSiFGEP5mfzNqVCypKwLtWPaDrgaberY=; b=iGhmFt6HqVYM5I44PTL2tnskyDG+i38s3qtMH6DfWEb7TWtTgVtoJwqsoWYSvCOdVj u+Hm4DZkZf2ALyuJIDVNT6G5aDv/2F5tG7gjPdLVyWkm9Pkg83BBwyN+6uDwgBR1V6Ma oSeBNIZG0xGvoal/DCXqEX4cNKDwuutTFwGVn/FfHFBtd2F/y80nVAgePt2oCypaRc8v TxR+cllVIWacp01hloZVBk0T/aoArTtmkN/Gqv/YRqdQ7Ah9QJReqyAMjncvnySlZMJc bvHQRDsj4NgRyqVMRpARXo/XTIuRV2sfg9uJATSbWsVUrgnfBiT5okbR8oeu+aHxT43l u3uA== X-Gm-Message-State: AOAM533661Tx8VfYPNXYsE+fSnLEDskaYYrihQPnnCUN5DK507ycFrsp WjiP0sV++716QoIindVv8YZed2cPtNZg6A== X-Google-Smtp-Source: ABdhPJwLept01+S+ckLiO+lNwbUssjL6CJq7PlHtQi/S7gMw0bhgna9DTul4SBrBcDzTSfwCbzmKbg== X-Received: by 2002:a2e:87cd:: with SMTP id v13mr2360284ljj.180.1598037538528; Fri, 21 Aug 2020 12:18:58 -0700 (PDT) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id t27sm548163ljd.101.2020.08.21.12.18.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Aug 2020 12:18:57 -0700 (PDT) Received: by mail-lf1-f54.google.com with SMTP id b11so1436304lfe.10 for ; Fri, 21 Aug 2020 12:18:57 -0700 (PDT) X-Received: by 2002:a05:6512:3b7:: with SMTP id v23mr2073008lfp.10.1598037536954; Fri, 21 Aug 2020 12:18:56 -0700 (PDT) MIME-Version: 1.0 References: <20200821123746.16904-1-joro@8bytes.org> In-Reply-To: <20200821123746.16904-1-joro@8bytes.org> From: Linus Torvalds Date: Fri, 21 Aug 2020 12:18:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] mm: Track page table modifications in __apply_to_page_range() To: Joerg Roedel Cc: Andrew Morton , Linux-MM , Linux Kernel Mailing List , Chris Wilson , intel-gfx , Pavel Machek , Dave Airlie , Joonas Lahtinen , Rodrigo Vivi , David Vrabel , Joerg Roedel , stable Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: D050F1802B569 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Aug 21, 2020 at 5:38 AM Joerg Roedel wrote: > > From: Joerg Roedel > > The __apply_to_page_range() function is also used to change and/or > allocate page-table pages in the vmalloc area of the address space. > Make sure these changes get synchronized to other page-tables in the > system by calling arch_sync_kernel_mappings() when necessary. I get the strong feeling that these functions should be using a "struct apply_details *" or something like that (the way the zap_page_range() code has that "zap_details" thing). Because adding more and more arguments gets pretty painful after a while. But maybe the compiler inlining it all makes it a non-issue. It also strikes me that I think the only architecture that uses the whole arch_sync_kernel_mappings() thing is now just x86-32. [ Well, x86-64 still has it, but that's because we undid the 64-bit removal, but it's on the verge of going away and x86-64 shouldn't actually _need_ it any more ] So all of this seems to be purely for 32-bit x86. Which kind of makes this all fail the smell test. But the patch does seem to be the minimal fix for a real issue - I'm just pointing out ugly details, not actual problems with the patch. IOW, a somewhat reluctant Ack, hoping that this will be cleaned up some day. Possibly/hopefully because arch_sync_kernel_mappings() just goes away entirely. Linus