Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1418243pxu; Fri, 16 Oct 2020 11:24:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhNP65u6DaAVFJplJf4pxcVXl5Q1pLGKA1bFMQnzSzEHKQMoIwjnlhLsxDqSk5EzwuSFzJ X-Received: by 2002:a17:906:5402:: with SMTP id q2mr5079401ejo.316.1602872674039; Fri, 16 Oct 2020 11:24:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602872674; cv=none; d=google.com; s=arc-20160816; b=SeZcqfDLCrqiwWpbSfMrs3hHKOzd6XGeKSJbKVHDVcYMhdjFJ8CynuCyVfsWjcFJ20 9bWcOBibf+fjuIG7V0cwR+/5hRPwN3bwUldRq/1Szc4s5TkkKz7CJqhfol65xMu8nH4h u5kYLRF1TceNNrztMe/M345u0VLdIsQBhRLzScRPKhwCsvV+8mylaeLOQ+93w6HppCxc B/FSGyvmHIP3oiuRn2Ud0WMPB8yUMxFwyVeJgvWLNgQXVm4XqWrpsCzzFEUPFVixD6eB vlf5hvVCulfpbkQ77QglSZhb/F20Ol5xxewjJAF13o0OgKGs5lDBkId/4NfefLPPOziV BGGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YUQjk3PEP/Lxo9pK9C44oGWzEABQvzmK7tR90OE3q3A=; b=H0Oy9KQz4JOIGgiPeYs8+KlY1dEdNrN0aRZz1Op9iGhw12KMnS6reL1Sb9d9pocYKd IQU7ddwfTrtZteNER/S5lN/MDtHhMVmqPzehSVXCgbcVfsPWtWXlCcrfenlZc9XFx3hQ 7HsyPcJ2GEmBb6IEDiPqjqMfbhwCSk/Br8uDaAm5iwoFdVo1BFEiww/ZELEjQuFwUsC9 jo3EkwYfvzh/T3WCek+eVsX0djNTVLh9QshWw55KfSJWM001slGV+ocD3bydcvgkhhiS DgRZUWlIC73LKsIb+OMSaAa1GbRWSa3VwWn/rG1I/e+dxzE8XiV9OtI4M+S5nyWxQVYO R2PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=MfcdBprO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm10si2238987edb.559.2020.10.16.11.24.09; Fri, 16 Oct 2020 11:24:34 -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=@alien8.de header.s=dkim header.b=MfcdBprO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391554AbgJPSVv (ORCPT + 99 others); Fri, 16 Oct 2020 14:21:51 -0400 Received: from mail.skyhub.de ([5.9.137.197]:32892 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391545AbgJPSVv (ORCPT ); Fri, 16 Oct 2020 14:21:51 -0400 Received: from zn.tnic (p200300ec2f0d0d00cf555b949331184a.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:d00:cf55:5b94:9331:184a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 15C821EC0502; Fri, 16 Oct 2020 20:21:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1602872510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=YUQjk3PEP/Lxo9pK9C44oGWzEABQvzmK7tR90OE3q3A=; b=MfcdBprO82Gs6USW3t2uxtDnPe1JyUvB0k99HSBCcmVqvcLThIJkxEdkmwMpSfYDH5N1kP MrZXJ2BALq3J8u5gh7xlv9mJuZqSpLP0lRjVkOhhDoM60RM5sdUx68Y9dfuw+VRziFrW/J goMyW63H1+aGXJPvshIJoTJqgJoiyrI= Date: Fri, 16 Oct 2020 20:21:40 +0200 From: Borislav Petkov To: Ankur Arora Cc: Andy Lutomirski , Andy Lutomirski , LKML , Linux-MM , "Kirill A. Shutemov" , Michal Hocko , Boris Ostrovsky , Konrad Rzeszutek Wilk , Thomas Gleixner , Ingo Molnar , X86 ML , "H. Peter Anvin" , Arnd Bergmann , Andrew Morton , Ira Weiny , linux-arch Subject: Re: [PATCH 5/8] x86/clear_page: add clear_page_uncached() Message-ID: <20201016182140.GJ8483@zn.tnic> References: <20201014195823.GC18196@zn.tnic> <22E29783-F1F5-43DA-B35F-D75FB247475D@amacapital.net> <20201014211214.GD18196@zn.tnic> <3de58840-1f4c-566b-3a66-46d57475820c@oracle.com> <20201015103535.GC11838@zn.tnic> <593f3b75-678c-1cd4-a7f0-55257dc84caf@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <593f3b75-678c-1cd4-a7f0-55257dc84caf@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 15, 2020 at 02:20:36PM -0700, Ankur Arora wrote: > The case I was thinking of was that clear_huge_page() That loop in clear_gigantic_page() there could be optimized not to iterate over the pages but do a NTA moves in one go, provided they're contiguous. > or faultin_page() would faultin_page() goes into the bowels of mm fault handling, you'd have to be more precise what exactly you mean with that one. > know the size to a page unit, while the higher level function would know the > whole extent and could optimize differently based on that. Just don't forget that this "optimization" of yours comes at the price of added code complexity and you're putting the onus on the people to know which function to call. So it is not for free and needs to be carefully weighed. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette