Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp717003pxa; Fri, 14 Aug 2020 16:25:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMN6tvgWuMst8IS7BUBjWWktYzt06Kgqx9VMMCK2in+YTzgYros3z26ADFbcDmrWiuLuvO X-Received: by 2002:a17:906:68b:: with SMTP id u11mr4943064ejb.143.1597447517056; Fri, 14 Aug 2020 16:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597447517; cv=none; d=google.com; s=arc-20160816; b=A4O7SZVZl89YBIlvYhryWZWKzEUlgoYq3A6YgWSCFwogp2T6/8xdjXHIqqWZgXP5+3 rRAWVMuvPWAKbDZ8VDb6MAClVhxZ5e3KaukhDNjqv7SBEhM5GYjN7c6xxN9tAe37Rj3y aWSLDI+pqFRPWopyuvzJJb4EQgJ1r0bVDGGDVCNc9mG8cslBmm12pSrkwto8u3KkBV/F 75oJPuq+Fkp3qfVn2lqxY3lEcUFdPcQ1/dyUkpYEU91E3JjjYRX19tWB64nE3SQtKAe+ yNgSJAnsM14pXbuBxIejDoieCpFCLlwELIjn01QWCIkTbi3EcBzVWG0LIIVkRNAjPVhk KsuA== 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=Cw/Xi+zTnVph1e4MFSY/wz6yqwLJpsrk++bjsEyga4k=; b=qpUzO3q6fJap71PQATEP458P/cFAJ4E4dlGD1JBLkWZH0rwERP0NYY9CJxXXxHU78W DiGn1A+86Pu9K/iYTkmHOka8dvyTIOqM6/FXy8aHmZMxgaF2k4P9JaPPgHpbGj4lI78B AkllBLdI6Km9TQweB3jtS0BWqCMqL1/rcpuvjTkORfqu35HpatuYFRpSoJCDt+uXqZwc /9qoSTZr/D0BmqOAvVV2CM4aLuwKmVfBMXmEBashgIVuApl/6EZtwgqY+hfQGOnSrg4x urJJpo5FGMHPtbOw5e9awvfyXtsPxEt0ih06R0jTJ2DMXvoMHIWR1AC1u8rkSvYxkXg6 wUlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=gBmiWZUc; 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 y20si6321287ejj.325.2020.08.14.16.24.54; Fri, 14 Aug 2020 16:25:17 -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=@linux-foundation.org header.s=google header.b=gBmiWZUc; 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 S1728057AbgHNWk7 (ORCPT + 99 others); Fri, 14 Aug 2020 18:40:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726919AbgHNWk7 (ORCPT ); Fri, 14 Aug 2020 18:40:59 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D59FC061385 for ; Fri, 14 Aug 2020 15:40:59 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id v9so11540124ljk.6 for ; Fri, 14 Aug 2020 15:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Cw/Xi+zTnVph1e4MFSY/wz6yqwLJpsrk++bjsEyga4k=; b=gBmiWZUczwz3Q1oPbPKyqeSDui1X6O9Kt/ZmsnT8NLd59EQmQWhvQdSCRYGjswsOPw MHKj25WfDZYFKZsMyBVQks4287vVbGdrDRd3GeBmkPlM7zgqOIkH+aR3ebuNjPEYwh3z vPg4TJKNWq+J0d1Au0Y3jxKtyUtjlWDJJCEhc= 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=Cw/Xi+zTnVph1e4MFSY/wz6yqwLJpsrk++bjsEyga4k=; b=oRulHqa7zz6dZCA7zXLDGpA6PAmjRG51Uw7kkwATnBZsLCyGzO4TxgOfi3bifk2iYT jwFH+frp+PXGlrfzcNTKyS9dBMlcWiV4nHTSe5DWpdqZQxmRP4Q2XPh7WdjQhrb9Ee8R U+0OffD9e40rhtgLGYMy+9WLoGID0WTqYx+nagm9PpD8Xvq6iTDMA6d+NiIM3o+Jf330 EPQpm7Owi+poNwtuHtOO0RwRUZqNIPxlG3QDn6fzdVXqLiiFGDed8ayjBel8wfZHtmS9 dHDTo+CEyPmJZ+SQqRp8fCvi/Bfts8qPbPKu41Rs1FDkwKB8jEy1uobgV4VY0Jmdckmm AdaQ== X-Gm-Message-State: AOAM532wsDGDKQM8+WaIfT0FLogXs4XDWmllLBZNFu+yYt7im3fogHmd o8Vl6mpeoUi/UBtjn7ce4yDDH1ecc2d/Yw== X-Received: by 2002:a2e:a58b:: with SMTP id m11mr2187780ljp.135.1597444857004; Fri, 14 Aug 2020 15:40:57 -0700 (PDT) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id e19sm2154262lfc.7.2020.08.14.15.40.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Aug 2020 15:40:55 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id 185so11507919ljj.7 for ; Fri, 14 Aug 2020 15:40:54 -0700 (PDT) X-Received: by 2002:a2e:9a11:: with SMTP id o17mr2094857lji.314.1597444854609; Fri, 14 Aug 2020 15:40:54 -0700 (PDT) MIME-Version: 1.0 References: <20200814054241.GA719@lst.de> In-Reply-To: <20200814054241.GA719@lst.de> From: Linus Torvalds Date: Fri, 14 Aug 2020 15:40:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] dma-debug: fix debug_dma_assert_idle(), use rcu_read_lock() To: Christoph Hellwig Cc: Hugh Dickins , Andrew Morton , Dan Williams , Eric Dumazet , iommu , Linux Kernel Mailing List , Linux-MM 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 Thu, Aug 13, 2020 at 10:42 PM Christoph Hellwig wrote: > > The whole thing predates my involvement with the code, but I defintively > think the patch from Hugh is a major improvement. But I would also > have no problem with just removing it entirely. I decided to just do both, since neither you nor Dan seemed to really object. I applied Hugh's RCU read locking patch as a clear improvement, and then I did a second patch that just removed this function entirely. That sounds a bit odd, perhaps, but in case people decide to resurrect the debugging code, I didn't want us to lose sight of Hugh's improvement just because I then decided that we might as well go one step further and just remove it entirely. And the only real reason I care is that this whole COW and page lock thing has showed up lately, and I like removing code. I'm _very_ tempted to just apply my COW simplification patch that gets rid of all the complex try-to-share cases entirely (and would also obviate the whole forced-cow patch). I suspect it would effectively remove almost all of the [un[lock_page() bottlenecks entirely, but that code has decades of history and I suspect it's a bit too drastic wrt KSM and the swap cache pages. It would be lovely if the main source of page locking would really be about just IO, but the page lock has also become the thing that serializes almost everything related to page state. Which is why you find it in contexts that are really not IO-related at all (not just COW - page migration is the other one that has shown up a lot under "heavy CPU loads" without really necessarily any IO component to it). Linus