Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp304843ybj; Fri, 8 May 2020 12:15:11 -0700 (PDT) X-Google-Smtp-Source: APiQypI/Mq1oHse9muwg6g6ln2E540L0HLF316/NnMHhUXRuDtD33BQdRS976Zjj8JUUJDQZ3W+7 X-Received: by 2002:a17:906:1e51:: with SMTP id i17mr3252736ejj.336.1588965311112; Fri, 08 May 2020 12:15:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588965311; cv=none; d=google.com; s=arc-20160816; b=m/OgNvjsgDl74zk7BgVmt/ByV6von0QXSsL4WK50DmUATAEQyrtqtPDA7Gc1oqURye UFJjQGePQipJH+BLmuYkbO7sIMvXkoWXe6nHfNpI9Qlc6psa0FYNoMExXAdmKVEDnv0d 7cLiSNxmEyC5bFLJx81cLyeLI0Y0YcknTAZFjmJt2XW/eZDUfEzqY2fhSA6P0xc8i/Ep gMVXiovXoUJ44W0DU/QbvahxrobX3DYTuYxU9G+pevIzNChS1YxqG/GywyB5m1hLDjKg 63B127r6LaB10tW9arFy5e32gNdMKIDeVkgpnWLa6s3Upxk/JwdLEAwm84UOrfD0HfOg twuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=tUWbBKI5h7qcIWqn7V5B9OOroJpHaOkMQ99gt8+paWg=; b=YVIYggKdc+CZHyXyA1PockuZlO7CsNNO/OKM7qC9gz6wjBraq13kVNm2g+uHfliZjr n+vLknNlC7tE8krgpU7Plm4ysVqPWDBeA6SoMX2Bq6MSfQGC1i5QAYYxs+WXVQcjMjC/ W/cWMoGjM3LMp78YoldjhJ7HDiiyyY2BPeB+RAuKlRsqPf/iUErJWt4w1kCgwoZf8+rf 4jL+pmvWMXN7cwK2gdFuiLSj4uKvRjApE0hqNtpn92fXghX1U4D4Bier8r3YDlz3w4II s8RY8FKqKr4WAfCgAzRBtnctI46m7vkZ2zp1IiJWQc+QqPCMnArWZETLyLXjHzvh8mV9 ncTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZFIdwDhl; 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 q6si1483577edh.532.2020.05.08.12.14.47; Fri, 08 May 2020 12:15:11 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZFIdwDhl; 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 S1727771AbgEHTLP (ORCPT + 99 others); Fri, 8 May 2020 15:11:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726767AbgEHTLO (ORCPT ); Fri, 8 May 2020 15:11:14 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2C5AC061A0C; Fri, 8 May 2020 12:11:14 -0700 (PDT) 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ...