Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2169893ybt; Sun, 28 Jun 2020 10:14:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKko9qI6+cV0p45Sz/8NEb4IqCrW65VvAaSLHjQSKL+GFFat3Mq/UqukjFAVi6Ve8LZvOI X-Received: by 2002:a17:906:ce3c:: with SMTP id sd28mr8895547ejb.382.1593364444227; Sun, 28 Jun 2020 10:14:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593364444; cv=none; d=google.com; s=arc-20160816; b=dhull2rIw6bxjDk5n5tZGMDLlBpsywdOMnggdBAvWPPsSWO9etn4an6QeRBAHtdR1c OO70mOZEKOF+do3nw/H/vAryv960Sv9f5WAB0yaL43qyJ8QIlFjRxoYriCJZWK26XF5B WL2lia1bucahTV31pgzPJKHGuynvIi+uRyjnpCLN3vNeQFI4PIvhhzpKMIF+FQovZy3F zDOaTkkmq2/FUOvvx7Zmcr/bkY8eU2GdDUVyOgCSQ/O68/r5eW5rVVD9C0yWRlpmeXCw S+oflObwefIxTLyb2Pmg59vP6uH5tHF9+HTVrAQf9utg9YhENrZ2o/QMNmoIksCe6XJG yUWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=aHBo9wbaRoVXLY9NDJVIGwtnv5GehbPHBWMQ1wY/EhI=; b=I3U64aOItlwgLYcU38dJsWs3dLrD45lKNNwYupXbAH1KTU3SmxCMHq9o520n+lb1Vx mNx7N6C0IWubydXp7Vt25vjzk9qDoNqhKz+Ew+CirZi+dUD9Ce09s+oYLS+TINFedFuQ V1kQnbkvAMWa1J4+B5uJbmebx+67dZST2mhxEbnraj+O1rIGRmoG+w1KGbZPFBrgrlyV yHz92GO6voXQ9s40X6w2V/srlO0PTu+IhPe5JXuv5sBYglEGS5hVklA1L1D2SVzUPwzW 1AtYveoozwzfMVDuj3ZJgSOb8aq5Ohtf9wGoLJ39K8Z4NEBVIPRkGRMcjRMH6QdBQRLg lqPQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si8705473edm.321.2020.06.28.10.13.20; Sun, 28 Jun 2020 10:14:04 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726181AbgF1RJT (ORCPT + 99 others); Sun, 28 Jun 2020 13:09:19 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:39078 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbgF1RJT (ORCPT ); Sun, 28 Jun 2020 13:09:19 -0400 Received: by mail-ot1-f66.google.com with SMTP id 18so13355758otv.6; Sun, 28 Jun 2020 10:09:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aHBo9wbaRoVXLY9NDJVIGwtnv5GehbPHBWMQ1wY/EhI=; b=fItJCqm4myUgd2+LuL/Q9OFRg+1GmcR5hcKD4e++SFrvLEDXb3WUD2GyKUDqf4qYHs 9KeeNyxv2Vk2kUuW9f6/mtxIvEZLOuqy2+ups2AbpSc4JImtBSa842fb4g0Cotn/OcRg 5ohhvfubaXMRyF+x9y6ewbnwpRzvKOGNUyiV/lG95dmceSGZVtucj5I8Q/tPYRM9xXGI HJMpbkl3FMRzJ1XTZhKgQNbr5v0iJ6FD5KJNUUJPUHxBU+agSIqeVdj9oR7ghOuEdxCR ayss1uwj9xnrqTDhWfKgVLQrBULYa9vYeZGG9iDJsLB96FYaZa4z3W4et1yMTQtggJKa qwTg== X-Gm-Message-State: AOAM532aN7+1CLPympg6Yn8fB4QPAZn+W9g7qawXNtU8q5E3etxdk3az 65Kg7rLidxl329AWgZq2AMTBBy4WdfdkeDyibxY= X-Received: by 2002:a9d:7d15:: with SMTP id v21mr10130090otn.118.1593364158371; Sun, 28 Jun 2020 10:09:18 -0700 (PDT) MIME-Version: 1.0 References: <158889473309.2292982.18007035454673387731.stgit@dwillia2-desk3.amr.corp.intel.com> <2713141.s8EVnczdoM@kreacher> <2788992.3K7huLjdjL@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Sun, 28 Jun 2020 19:09:07 +0200 Message-ID: Subject: Re: [RFT][PATCH v3 0/4] ACPI: ACPICA / OSL: Avoid unmapping ACPI memory inside of the AML interpreter To: Dan Williams Cc: "Rafael J. Wysocki" , Erik Kaneda , Rafael J Wysocki , Len Brown , Borislav Petkov , Ira Weiny , James Morse , Myron Stowe , Andy Shevchenko , Linux Kernel Mailing List , Linux ACPI , linux-nvdimm , Bob Moore Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 26, 2020 at 8:41 PM Dan Williams wrote: > > On Fri, Jun 26, 2020 at 10:34 AM Rafael J. Wysocki wrote: > > > > Hi All, > > > > On Monday, June 22, 2020 3:50:42 PM CEST Rafael J. Wysocki wrote: > > > Hi All, > > > > > > This series is to address the problem with RCU synchronization occurring, > > > possibly relatively often, inside of acpi_ex_system_memory_space_handler(), > > > when the namespace and interpreter mutexes are held. > > > > > > Like I said before, I had decided to change the approach used in the previous > > > iteration of this series and to allow the unmap operations carried out by > > > acpi_ex_system_memory_space_handler() to be deferred in the first place, > > > which is done in patches [1-2/4]. > > > > In the meantime I realized that calling syncrhonize_rcu_expedited() under the > > "tables" mutex within ACPICA is not quite a good idea too and that there is no > > reason for any users of acpi_os_unmap_memory() in the tree to use the "sync" > > variant of unmapping. > > > > So, unless I'm missing something, acpi_os_unmap_memory() can be changed to > > always defer the final unmapping and the only ACPICA change needed to support > > that is the addition of the acpi_os_release_unused_mappings() call to get rid > > of the unused mappings when leaving the interpreter (module the extra call in > > the debug code for consistency). > > > > So patches [1-2/4] have been changed accordingly. > > > > > However, it turns out that the "fast-path" mapping is still useful on top of > > > the above to reduce the number of ioremap-iounmap cycles for the same address > > > range and so it is introduced by patches [3-4/4]. > > > > Patches [3-4/4] still do what they did, but they have been simplified a bit > > after rebasing on top of the new [1-2/4]. > > > > The below information is still valid, but it applies to the v3, of course. > > > > > For details, please refer to the patch changelogs. > > > > > > The series is available from the git branch at > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \ > > > acpica-osl > > > > > > for easier testing. > > > > Also the series have been tested locally. > > Ok, I'm still trying to get the original reporter to confirm this > reduces the execution time for ASL routines with a lot of OpRegion > touches. Shall I rebuild that test kernel with these changes, or are > the results from the original RFT still interesting? I'm mostly interested in the results with the v3 applied. Also it would be good to check the impact of the first two patches alone relative to all four. Thanks!