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 1B3BCC433DF for ; Fri, 16 Oct 2020 18:21:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5B53C20E65 for ; Fri, 16 Oct 2020 18:21:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="MfcdBprO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B53C20E65 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 821986B0062; Fri, 16 Oct 2020 14:21:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7D2606B0068; Fri, 16 Oct 2020 14:21:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E72A6B006E; Fri, 16 Oct 2020 14:21:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id 413F66B0062 for ; Fri, 16 Oct 2020 14:21:53 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id AEB161EF2 for ; Fri, 16 Oct 2020 18:21:52 +0000 (UTC) X-FDA: 77378607264.09.pear40_27062ad2721f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 8C665180AD806 for ; Fri, 16 Oct 2020 18:21:52 +0000 (UTC) X-HE-Tag: pear40_27062ad2721f X-Filterd-Recvd-Size: 3261 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Fri, 16 Oct 2020 18:21:51 +0000 (UTC) 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> 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 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