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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 883E8C47257 for ; Fri, 8 May 2020 19:11:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4E7202173E for ; Fri, 8 May 2020 19:11:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ZFIdwDhl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E7202173E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B7649900003; Fri, 8 May 2020 15:11:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B262E8E0005; Fri, 8 May 2020 15:11:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3BDC900003; Fri, 8 May 2020 15:11:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 8A0648E0005 for ; Fri, 8 May 2020 15:11:03 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4A33C5000 for ; Fri, 8 May 2020 19:11:03 +0000 (UTC) X-FDA: 76794494406.06.bed21_92a22726040d X-HE-Tag: bed21_92a22726040d X-Filterd-Recvd-Size: 3302 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 May 2020 19:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tUWbBKI5h7qcIWqn7V5B9OOroJpHaOkMQ99gt8+paWg=; b=ZFIdwDhlPQCBP+06Xc6FGc6o8R j4DJhPCH38rngf1Il0cTp/VUfH9Np0uLsnYfo0MGHwHFjmQyAvch8XUco4wEhUDgfDrulWKfm7+Y8 xOyo+9JvgR/pioiJwmMKz6uTB92VX0IPpurv9wUvNpcHWJ0YXO9AOqYdWkGgm0G/K8QQvqdigrrSX c6eQ0hynD5RgDcm832/SyKns3BR3ugOKv9sbjDy13tg7Vr/hc8rAd8LrsD5WWUIEPsUhOXmLwZuAL vfoywGZ8lH8pQY55bkkXAQI3eCvfk5jVYrJ/CbTotVTJtQvLk9bb9NhVMlWBrpLuonmfu3eZEk0zP TI82M9Ng==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jX8OZ-0001Qe-1C; Fri, 08 May 2020 19:10:51 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7FB2F301DFC; Fri, 8 May 2020 21:10:48 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6AECD203CB697; Fri, 8 May 2020 21:10:48 +0200 (CEST) Date: Fri, 8 May 2020 21:10:48 +0200 From: Peter Zijlstra To: Joerg Roedel Cc: x86@kernel.org, hpa@zytor.com, Dave Hansen , Andy Lutomirski , rjw@rjwysocki.net, Arnd Bergmann , Andrew Morton , Steven Rostedt , Vlastimil Babka , Michal Hocko , Joerg Roedel , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 2/7] mm/vmalloc: Track which page-table levels were modified Message-ID: <20200508191048.GA2957@hirez.programming.kicks-ass.net> References: <20200508144043.13893-1-joro@8bytes.org> <20200508144043.13893-3-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508144043.13893-3-joro@8bytes.org> 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, May 08, 2020 at 04:40:38PM +0200, Joerg Roedel wrote: > +/* > + * Architectures can set this mask to a combination of PGTBL_P?D_MODIFIED values > + * and let generic vmalloc and ioremap code know when arch_sync_kernel_mappings() > + * needs to be called. > + */ > +#ifndef ARCH_PAGE_TABLE_SYNC_MASK > +#define ARCH_PAGE_TABLE_SYNC_MASK 0 > +#endif > + > +void arch_sync_kernel_mappings(unsigned long start, unsigned long end); > + if (mask & ARCH_PAGE_TABLE_SYNC_MASK) > + arch_sync_kernel_mappings(start, end); So you're relying on the compiler DCE'ing the call in the 'normal' case. Works I suppose, but I went over the patches twice to look for a default implementation of it before I figured that out ...