Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1053683pxa; Sat, 22 Aug 2020 09:17:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdIC8hiIb0ENwzEzxx8Qghsr6+UmO5KQM9HmX3q6admBDm7zPEX8emKKR+4jAU//nCJ6AR X-Received: by 2002:a17:906:c7c8:: with SMTP id dc8mr7442417ejb.399.1598113035509; Sat, 22 Aug 2020 09:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598113035; cv=none; d=google.com; s=arc-20160816; b=Ckl8MlckH4jkkCGh2Mb++yNSPrINHST5LSiYu9xydNs7sm+V1KWvskO/EIwKMdccrM SCOHHjsQDotiZTmLl2WhjAyl/lRpzu4GgULYMDY50hB2Xo1SH6VZMreZZXjpd59DkDET ow8AGcnGzRwNxkORzS6c46/QDIIZsF/dEKL4531Q02sK+kMHQJyfUZBE35jaQgxbGqgl OuWjW+1Vby9Srkc0IHAsT2B5RaycHGQknSi0vOcSL8PmEjlxbPNIPHZKXwcmXK9czOoW iQjmugIkfJmA7GI4wsKRwD1gQCZE6ZDmfvztHyt6ZlfSUHLxKNvEJy7qvRBe6Dv8iYfP Qf6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DccEA513kG09pYFTy9tF2UmbKr/4AYjsRYNHkzx6gSw=; b=q/0t/JXbntLqF8lYEVrzshCEzSCRip+rJjksyNqki1FCKDJaUDeuMjwy9sDCBg7Lo2 HHI1/Cscdm8zOloDFLSAeysLkzFkM5u3dMf5cb17ky9ioQ5xrU47CD54V3eSSeGybVa9 nnp92xifLvsrlkEmESrhXm1QNqdlLI1/PrpbOrs0dPloANOCRuPJ5ngcCVUE6P60f/Uq lb3saFsNWBK6NC59p+u+kO2S30di4vNryABpBLasPMcVoDDKgkcNG5W3x9wsCih4/0ml eqAaJaag19/VPDvSyNvQ3Ro2c61F2mUW2zvnnk4QxatJxfCzcocRQuft6On7vXOEZGzj QHDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 cz6si4181987edb.188.2020.08.22.09.16.51; Sat, 22 Aug 2020 09:17:15 -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; 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 S1728380AbgHVQND (ORCPT + 99 others); Sat, 22 Aug 2020 12:13:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:57120 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbgHVQNC (ORCPT ); Sat, 22 Aug 2020 12:13:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 49E7DB746; Sat, 22 Aug 2020 16:13:29 +0000 (UTC) Date: Sat, 22 Aug 2020 18:12:58 +0200 From: Joerg Roedel To: Linus Torvalds Cc: Joerg Roedel , Andrew Morton , Linux-MM , Linux Kernel Mailing List , Chris Wilson , intel-gfx , Pavel Machek , Dave Airlie , Joonas Lahtinen , Rodrigo Vivi , David Vrabel , stable Subject: Re: [PATCH v2] mm: Track page table modifications in __apply_to_page_range() Message-ID: <20200822161258.GP3354@suse.de> References: <20200821123746.16904-1-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 12:18:41PM -0700, Linus Torvalds wrote: > 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. Yeah, it is certainly not the nicest thing to have in generic mm code, but at least it is an improvement of the vmalloc_sync_all() interface we had before, where the function had to be called at random undefined places. And x86-32 needs it, as long as we have the !SHARED_KERNEL_PMD cases (which includes legacy paging). Or we also pre-allocate the PMDs on x86-32 and forbid large ioremap mappings. But since the vmalloc area gets larger with less RAM on x86-32, this would penalize low memory machines by using more pages for the pre-allocations. Not sure if making the vmalloc area on x86-32 a fixed 128MB range of address space independent of RAM size is doable or if it will break some machines. But with that pre-allocating PMDs would make more sense and we could get rid of the p?d_alloc_track() stuff. Regards, Joerg