Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3044714ybt; Mon, 29 Jun 2020 13:47:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvtQBlLv+HWlprkhtGSwSnqGhWilJsA/HNV0fjZ9gvqkzOCYkX9m8q8Q+RMRplYlkEDF+P X-Received: by 2002:a50:d0cc:: with SMTP id g12mr19925984edf.57.1593463666819; Mon, 29 Jun 2020 13:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593463666; cv=none; d=google.com; s=arc-20160816; b=u4n71rIJp9bBHbUIHNwBwgly+rHNCW0WQC/XI8qfHPDCQk7fAncufjNNs0zRzFAxnP RwxbR6TjaYSlZDCjPOVE54wxWyrWOFnFzmXQ6E2mjVZIWGVdRRh6GmVt3rUoe7tJj80j pnuavFlA5BVDpg0c0P3jD5LVWctmHTHIY9Ibz1BsHHacZjwST6/rbIcN+nsZXdJnbDbU SJOZiIyfzNWsgrVj3hM7jsU1NhQPI2v99nDjzLJ3f5P3AW7EeIFxJ+OI7hBrqXl2V0A7 TMpnvpOOJ3oHedm3ClbGCfSoeKVhXPJwS9peON5rKW8JFnVU6o6pVNWTxgOyn1roU4CI OBwA== 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:dkim-signature; bh=048/aux/uWIN5e9D0xFyVGaUP4nryXDLfPyRWaH72Ek=; b=g61FxpB9Y+F2+95nQtwlY31feSuGZ71QV5txH8q129R7YJ3pYhTDa/fJTGMDQlfSvY 6D1pQotw8Z4gf1UsCgiMpxS/tLi/2eKZzc0uedor89wcmOtwnOonuqfQkYbBb3LbraxW 8zOn/9jQalmEP3byLZqq65wA8t00Atw2VNN9kXavWu0LwjGKg1V64AQUxojhFguVn+r0 tuJeetHEtrB9ITEF1xRvBdrfW5GpHTz+sTIN/Z5aN06nU0ExsujMGS2QqmUI+yv4ZqD6 EKvOYilZhjKiFjUd7XOEYfgUPsnmYMfhcHRM4AYwpGwesqb3+mCGxa5q6rRWyZG09o2J Jz7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=zD6ga5em; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q23si350221edg.348.2020.06.29.13.47.23; Mon, 29 Jun 2020 13:47:46 -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=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=zD6ga5em; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389743AbgF2UqX (ORCPT + 99 others); Mon, 29 Jun 2020 16:46:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731561AbgF2UqQ (ORCPT ); Mon, 29 Jun 2020 16:46:16 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 283D6C061755 for ; Mon, 29 Jun 2020 13:46:16 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id mb16so18205421ejb.4 for ; Mon, 29 Jun 2020 13:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=048/aux/uWIN5e9D0xFyVGaUP4nryXDLfPyRWaH72Ek=; b=zD6ga5emxtpmlIRAVfIT7c+0qmIa0JmJoiG9wTiBB3xtmmIy4qLmkRaMU4kRXvIQIa E83S8YIz7Tm0zhdu5czEB7Hln5/zBfAUh5P3RXjn5dpGJjPvlpteL/5yHDA4MrunZty8 SERNEQQciNzdZGDaWJlKmCkPqtQVKg6u1W+ITBhcA6VIARJxNSIYoOBIhTb6FYMn1Wfz 3h+U76ciDZZ+skAq1/OiIChJFBHAsTQFdkshuLB8hKyKewfGtGmRnNutNjYbPtDaaIfa Rs1pLnKujXyjWtD10YwTIaIE2NUaTA/V7kGdHd6AtMopwEmEJMRacTA40mLgLoY1u2lC qlxQ== 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=048/aux/uWIN5e9D0xFyVGaUP4nryXDLfPyRWaH72Ek=; b=coVpO8CmYt8YVwJcmh4e/Ki4mH3WXQ+7TbQCrLoqitYqbHiLBUIUVGzNImOFn+PI/u EGHaihGR9BTiSpcgtK7IfKG85FrKBUUgyLPUvkDo9mI8eTO5P9DqeCJG3OT5ovXh9Ddi kUANyInBcfBrO9yFDCdirpxofChOUiqugISdwp9uE1nD8+BcPjmp0ZqlUr5Cj/+Lpuqr HxXImI9HRLqMKc3tQ+DHb6ptU8LhrvcWs0sOfPBYLKsqtTqmlIsybahGf1eMZ1CmslEq ANtCoo49Dz33Ipl82yrNcviRPjNExM+3rnr0m4QXwQd7c7WmzmY4Zj1+swf9/ZBxFzY6 PKqg== X-Gm-Message-State: AOAM532eqDe7UuR5EmJB3tgG8zH2DUdMlloc0NGGs37ryOiEbmXGPyu6 Ahx6BAvlxYyTSq6hTTSZrCDORdbjqOuUbSm9Mw/JJA== X-Received: by 2002:a17:906:da0f:: with SMTP id fi15mr15169748ejb.237.1593463574870; Mon, 29 Jun 2020 13:46:14 -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: Dan Williams Date: Mon, 29 Jun 2020 13:46:03 -0700 Message-ID: Subject: Re: [RFT][PATCH v3 0/4] ACPI: ACPICA / OSL: Avoid unmapping ACPI memory inside of the AML interpreter To: "Rafael J. Wysocki" 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 Sun, Jun 28, 2020 at 10:09 AM Rafael J. Wysocki wrote: > > 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. > Ok, I just got feedback on v2 and it still showed the 30 minute execution time where 7 minutes was achieved previously. > Also it would be good to check the impact of the first two patches > alone relative to all four. I'll start with the full set and see if they can also support the "first 2" experiment.