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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 807E1C47255 for ; Fri, 8 May 2020 21:33:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 42D2F2051A for ; Fri, 8 May 2020 21:33:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="gBVpLpwX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42D2F2051A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B3399900019; Fri, 8 May 2020 17:33:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AE327900004; Fri, 8 May 2020 17:33:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2069900019; Fri, 8 May 2020 17:33:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0081.hostedemail.com [216.40.44.81]) by kanga.kvack.org (Postfix) with ESMTP id 8BD12900004 for ; Fri, 8 May 2020 17:33:34 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 52143824805A for ; Fri, 8 May 2020 21:33:34 +0000 (UTC) X-FDA: 76794853548.05.sack55_595608e647045 X-HE-Tag: sack55_595608e647045 X-Filterd-Recvd-Size: 3509 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 May 2020 21:33:33 +0000 (UTC) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A412024958 for ; Fri, 8 May 2020 21:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588973612; bh=ls4wVLtCuwHy+Ipjb7HA8vnN9MIN6Wmha+TzdYWtvKc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gBVpLpwXRca7BENelAhzKtHTP/0ltdA9cJoheMTx1P4GyW0YBcsAYsIu5/ptrBmE/ 5ZYCqjdqz9W1h6SF0WHOpZ51JTE8WS5DAWl1OLoHkkSP4X4Q2k49GHJFDuzASlXEU1 dxGoIwGC35mqkkAFmxmQekt9VysyPL8x4IUAaMek= Received: by mail-wr1-f53.google.com with SMTP id w7so3560703wre.13 for ; Fri, 08 May 2020 14:33:32 -0700 (PDT) X-Gm-Message-State: AGi0PuaAL9GEQ+OYI/iTRy751sgc+QXSruEIOvd9QHjeJXwYtKjEf1tO 0202O2DNFuNscJBsrSIkyjtfp+ZbjdAcTPWaMUql1A== X-Google-Smtp-Source: APiQypKkfKc8nwfTQ52CA43jPndN8sjJe/HJmtfTKVOm8iPpMCUmgdfl9U9gxXEGBQZwhTi1KHad8bdjblEo8vujjkg= X-Received: by 2002:adf:e586:: with SMTP id l6mr5031852wrm.184.1588973611034; Fri, 08 May 2020 14:33:31 -0700 (PDT) MIME-Version: 1.0 References: <20200508144043.13893-1-joro@8bytes.org> In-Reply-To: <20200508144043.13893-1-joro@8bytes.org> From: Andy Lutomirski Date: Fri, 8 May 2020 14:33:19 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 0/7] mm: Get rid of vmalloc_sync_(un)mappings() To: Joerg Roedel Cc: X86 ML , "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , "Rafael J. Wysocki" , Arnd Bergmann , Andrew Morton , Steven Rostedt , Vlastimil Babka , Michal Hocko , Joerg Roedel , LKML , Linux ACPI , linux-arch , Linux-MM Content-Type: text/plain; charset="UTF-8" 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 8, 2020 at 7:40 AM Joerg Roedel wrote: > > Hi, > > after the recent issue with vmalloc and tracing code[1] on x86 and a > long history of previous issues related to the vmalloc_sync_mappings() > interface, I thought the time has come to remove it. Please > see [2], [3], and [4] for some other issues in the past. > > The patches are based on v5.7-rc4 and add tracking of page-table > directory changes to the vmalloc and ioremap code. Depending on which > page-table levels changes have been made, a new per-arch function is > called: arch_sync_kernel_mappings(). > > On x86-64 with 4-level paging, this function will not be called more > than 64 times in a systems runtime (because vmalloc-space takes 64 PGD > entries which are only populated, but never cleared). What's the maximum on other system types? It might make more sense to take the memory hit and pre-populate all the tables at boot so we never have to sync them.