Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp486224pxa; Fri, 21 Aug 2020 12:22:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdp0ifInv9l5918dSAvHUl2Lmk+0Qip8l6VCek8qpm6OMCB6caaEYvNCNA26EoaNdm0d2E X-Received: by 2002:a17:906:b815:: with SMTP id dv21mr4222509ejb.517.1598037730990; Fri, 21 Aug 2020 12:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598037730; cv=none; d=google.com; s=arc-20160816; b=AYzVadYcQPkXwNb/+uBy3mvqzetKOF948Zz7I842NEjcAWpUEgouUPdbAJ76CZrXab NSLfQ6ehic3cSQEJD/1AwsSXAf6I9aM24WsR7MHP4Xdd1/2MvfOTaW9uGUxdZvwbwcKW lE0NPLKO7DzYYoTutb4ngmFbaCzC8rbA7k3iC7LzofKicnhpKLWCF0lSzES3mW3lBZKC pGLMTTnbFrzQaoCkv6PvlGDVVjsLNmX+q5as7rLouiV1TEKfzXKGdEg9KDKR5ivtuebr vJRDALwWTP6qmhjVGh3TGvMYCgIaSFEj0wk4jR6bTpHFq8fcnOhYbbsJ4mgkumXwZ/mf uBJg== 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; bh=DLc84kj5PHVUSiFGEP5mfzNqVCypKwLtWPaDrgaberY=; b=REbA+y95fww08Oir/q3njwmwWXM+3RrONqLZjb1UVC+tg9oJ0m3X123XYGPxbYGyf/ RUTijlq2Kg8YXdRxbgoJIzjpdAXftfWToQyL6RudHamTwDMrqFEEzlOqsdMetDo48ooo cc2I1+Z+K5FxybgSAjXAv+Vt3mt/nw1AKTLsQ7KQRA5dS9krb62JT69mFsTDQsIZWAni EDKT6UnbFH0sQF9S5XMRszCtztJjmQhRgeytgvDbiyYCQs+/K2g5IsmDTrweyRchCnkt L8uJA7UTDjTy/y+eO29TUOtWdzfJUwRnkTWyzv/6wkyf04WULWVTjLcqhEbVwGwYtl1y 1kTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="SofWc/w6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si1897422edb.401.2020.08.21.12.21.47; Fri, 21 Aug 2020 12:22:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="SofWc/w6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726624AbgHUTTD (ORCPT + 99 others); Fri, 21 Aug 2020 15:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbgHUTTC (ORCPT ); Fri, 21 Aug 2020 15:19:02 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25E0CC061573 for ; Fri, 21 Aug 2020 12:19:02 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id w14so3043046ljj.4 for ; Fri, 21 Aug 2020 12:19:02 -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=dnL9y5an4AebaHwClIguIf9fsQB19XYJunpi9sS9D9yLUJjFETf9gui5PWJ1d+0V8l oGAj3tTfDVQ4eg42LkZQPizPdR9hW0B7KLbh7mZMEhZdt0PenhzFn1ssg1fGboyQdDw/ GBgKDibf7UYhRfPFnJ1JO35ZhNBqIaD1oERxHM312HeoZ7mEJrZFTpx09fnG7WJWJIss UqM0INs+e0dr0Vt+8J7wu1T6Me1L9Ud0eACVfN1GEJwS9KZQoasDf1SEMFFgImr66PYN 6s7d7yMzCCB+5A9OekByzpEc0zGifekretnfwAc6w3XF6DI6aR881VAqz1Nh2OrFvfit Jq2A== X-Gm-Message-State: AOAM5336+FHAi7N+c4The5xfpAwlFcXp+pV1IgrbUUKf91wS1NqX2bIx wWO7Yz9b7xYrQHJ6NehbqNQ5DN45YwaOWw== X-Received: by 2002:a05:651c:555:: with SMTP id q21mr2081057ljp.6.1598037539655; Fri, 21 Aug 2020 12:18:59 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id e17sm550965ljg.85.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-f49.google.com with SMTP id d2so1446551lfj.1 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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