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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 37274C433DF for ; Fri, 14 Aug 2020 22:41:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1154020768 for ; Fri, 14 Aug 2020 22:41:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597444861; bh=XDNN0qetmBb0tjafDVM/RKigkg4Q0Y57RolwEmcG54I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=f4UtHaItSKfT/R/hCJinAmMOkNc32byA4w9d74yHxoDX2V+/uE3KUvPaPbszbjmdN qD1I1/ab7vvFun+omsanCmDxRet18Y5+SzOd8bhYNkEEbQvC0e3Pf+f70LC4i7qdiq K9F6JwVg/wrEHw11KkOaRrRdrIJULhCE82lfl13g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728088AbgHNWk7 (ORCPT ); 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-Google-Smtp-Source: ABdhPJzXtaKcveye7ueZYmY5nPv4IDStCpmEG5ii3y8x/j8FlENz9WJhXdHQVf/HPw6Xt5PRb6DEVQ== 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 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=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 B4013C433E3 for ; Fri, 14 Aug 2020 22:41:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5F2F22177B for ; Fri, 14 Aug 2020 22:41:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="gBmiWZUc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F2F22177B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 098076B0006; Fri, 14 Aug 2020 18:41:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0480E6B0007; Fri, 14 Aug 2020 18:41:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E9E8F6B0008; Fri, 14 Aug 2020 18:40:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0056.hostedemail.com [216.40.44.56]) by kanga.kvack.org (Postfix) with ESMTP id D586D6B0006 for ; Fri, 14 Aug 2020 18:40:59 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 99CF9825F8A9 for ; Fri, 14 Aug 2020 22:40:59 +0000 (UTC) X-FDA: 77150645838.16.oil04_6305a2827000 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 6C2AB100E6903 for ; Fri, 14 Aug 2020 22:40:59 +0000 (UTC) X-HE-Tag: oil04_6305a2827000 X-Filterd-Recvd-Size: 5115 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Fri, 14 Aug 2020 22:40:58 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id j22so5595932lfm.2 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=j3wfHoOJDH3Lm9vZURLg/j0UgWC2zMweH7xFnT0VFZcEFE1VB614J21mJLoRmUjl5n IFeusVSl9+Qmx4EgI1/sixdHijX26Y1GwDPGk0TeJti4C2LAdTGCr1JN2KZTV3BrIBWe dKLkzJVb8gyqv7bIdcpY1p3v1lEuGp6tI/DvKEhnsc4EbduSO7oF1frN6u+eXRh+hEhN 2eGeRUV+1stEics5LmWEIuwMXxkflfG7pYCJ1ryn1Yvlp086l/xMLWD8HcFeBUNFrnqU sziLV59kh+EsxO8Mdeb/G1k45al12lIj5WS6MhIf8Y/5g435QJqozOF4A7q4WiBdJvWB JB1g== X-Gm-Message-State: AOAM533wQ2ppcZeZKHDKXWT03E3YD4qR1YcSWNqJkGDtTwpysSMNG7yC ByA8pbJF7+dtU2AMP0R2dLRy+wkCAz1Wng== X-Google-Smtp-Source: ABdhPJz/gJ4s/CX89RbKtPLJyN298ShGNjScg7rJ56OfxaXtf5TIHWqOloK3xOkIolBJKTB0hfV+mA== X-Received: by 2002:a19:cccc:: with SMTP id c195mr2147328lfg.88.1597444856828; Fri, 14 Aug 2020 15:40:56 -0700 (PDT) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com. [209.85.208.174]) by smtp.gmail.com with ESMTPSA id u9sm2160377lfl.75.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-f174.google.com with SMTP id m22so11511505ljj.5 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" X-Rspamd-Queue-Id: 6C2AB100E6903 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 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 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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,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 DAE58C433E1 for ; Fri, 14 Aug 2020 22:41:04 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A2F2720774 for ; Fri, 14 Aug 2020 22:41:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="gBmiWZUc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2F2720774 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 53CFF21526; Fri, 14 Aug 2020 22:41:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2sbXpn30rpoQ; Fri, 14 Aug 2020 22:41:03 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 1949F20356; Fri, 14 Aug 2020 22:41:03 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EFF3DC013C; Fri, 14 Aug 2020 22:41:02 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id B1054C004D for ; Fri, 14 Aug 2020 22:41:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 99B0586D27 for ; Fri, 14 Aug 2020 22:41:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U3YPbz7ktCSa for ; Fri, 14 Aug 2020 22:40:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 5098C86D03 for ; Fri, 14 Aug 2020 22:40:59 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id m15so5583787lfp.7 for ; Fri, 14 Aug 2020 15:40:59 -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=fflxxUaczru/+Yb+znDwO2zrxRDrNyJHZ4OPwKCXrdfYSuxR/9z9nSbizjLANwSO2G Hgh7i3JwFvtINLfsBFiULzvz1mUjYehMs2bXeD2gOpO2n5bYFMiqCLb4b9+h3DNQgwyu HYr99PTaeCHc2hskTs/NVrxp0z8aYMUtJPdAkbtWeUvQV2j+FJ6/40WHwUQVGm1UdT70 0vCZQs+qMlQXLzJ6J+O7ceOVRQPb+VaemJcmo/HwXDSGRa2e+AuXqeKLH8tV1Z9yeGY1 JxFLlpd2Pq0P4V0lRh76OYlIuwgVIX3gJRloUqn3QbabAGgvdotwY7xnE1un1PUZvyB5 kEOw== X-Gm-Message-State: AOAM530CWMVi65IFuXi7mqbIGIlt8kS1QarvrczYQ1DGT55oR+HZcHzM RURl9PEo3hsD778FScS/D2/wDypcCHM8Rp43 X-Google-Smtp-Source: ABdhPJxm+ZLInlcm3Tmr+UpT6LMKKK6Q7MLDDcOYRd+Xve6WSP33i6MidatExHiKblgbMeGF2/L1rw== X-Received: by 2002:a19:70c:: with SMTP id 12mr2183288lfh.207.1597444856877; Fri, 14 Aug 2020 15:40:56 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id s21sm2007368ljs.8.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-f176.google.com with SMTP id t6so11497392ljk.9 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 , Eric Dumazet , Linux Kernel Mailing List , Linux-MM , iommu , Andrew Morton , Dan Williams X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu