Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp835789ybt; Wed, 24 Jun 2020 12:24:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfUREinC/LRnFFh4efLF3dYlZseo4JI5v2wzFvrMmCNAIFh1My45gmB0na80Ngsa9tVLR2 X-Received: by 2002:a17:906:ecef:: with SMTP id qt15mr26025635ejb.91.1593026648613; Wed, 24 Jun 2020 12:24:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593026648; cv=none; d=google.com; s=arc-20160816; b=HE58e9aT6YlXfGT9ew1BZmg55oIvCbOSJt0YpOqIErz+gwkGSZC8hI65i1xdaQqHeG IXV2GkaSYU+sCufNlNEcSuFKoeCJPDJjnWcE9OO8Xf5kWFMuCUgZZBp1b+E5bWZzIoe4 glOd7YgSE4KZEdV8qwX5OiZ53OgpuNNnOrB4s2+76JRIpq0LYF0rMg0dSaFir7gIl9MV AD3at33pPu6JR353fecMcJyzJGacrb6E4R/m6auaczI1OSYY5MecLXT4esMPjA2xnjez /rNWKxCWVuWntyEOSw1dtZgfbZon9Ioidcs5Ue0pNGcX4cWBWmBohtwu/ZUZ5rUjg77h I0Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=lbKCmmztI3GgkMC9SQmlMbuo/bkXgsTXp+Ju628Hzro=; b=S9P1+Ccr3O1adfHaNjV0ee1RHiNumhv7cqpYp9s+f9/SnfvPkplLI/7i684DAtAJK0 ua/OUcPRnM/mwsF7NrIsvizMTsjY1UQzKvVgVCGnX2fHdcwxIREFwMJhqOFRmdFNhMhy AU1NASiAWS+uwRCIhJl6MK29ZgohuFVz4IeuDdzjoidi5poc24KGVVgDq/I+tPJ5ktg+ lEswkxkVsKGwWSAdBKropuWvZBsJRNaKMXiV+sCVo+OK/dx6n4IpHiRv483AqzwL0Mlp KPxdn1KjK8VFGuZNqUb/P4TfCHP0xnfnWuE21XGn92uwPurM+/zS500dbHyt9J2giufy RuRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=OJncFXFd; 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 dj11si1057903edb.279.2020.06.24.12.23.44; Wed, 24 Jun 2020 12:24:08 -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=@ziepe.ca header.s=google header.b=OJncFXFd; 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 S2406131AbgFXTVU (ORCPT + 99 others); Wed, 24 Jun 2020 15:21:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404794AbgFXTVT (ORCPT ); Wed, 24 Jun 2020 15:21:19 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7059CC061573 for ; Wed, 24 Jun 2020 12:21:19 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id dm12so1592756qvb.9 for ; Wed, 24 Jun 2020 12:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=lbKCmmztI3GgkMC9SQmlMbuo/bkXgsTXp+Ju628Hzro=; b=OJncFXFdbc+4VNNWbBXY/ONS10iTtFLqYn5Nej/BXiYIlE7wXPRGFVSu8ZW607rFKr YknLuolvGMfXTw1BdQHDCnuJQI8IZ6e1ci5+5PMyFELyMNYv+yReSBqpSfGs10N4398w 6/M5HZ7dqwB1N6G71BIQ0sTf1V8F056Nsfj7I8ub3w36xCjEXwOz6x5x3TWV7KfmsSk3 vDTPMwCKXuQIt+B3olNNZtkZ5sWsE3yQQQpgCMuoryEKw4DkykTYk4c218295wog872Y 0VtDMaiEWJMNPTdQk9qgfZB4FowV506Ijg9f+kTS/YvAvzmq4EuQzUl/AY2TSgsnnw5T QgHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=lbKCmmztI3GgkMC9SQmlMbuo/bkXgsTXp+Ju628Hzro=; b=Y1XDPqAmvaJ/8mSLfluz/gmU3z2i/LGwPjxdjp6xc66bmRZ7jfFtza8H7gE71m7jA+ cyYrZSj6Fvm/k88DWi5l3mVf7YtffCrNSKh6ZnYjAdO9ffcNuSNOlmFFo33vo7HL3M87 JEwWiTkkKmmsyPUUDFFYKZ9FKufUPSWgGrar+dlbV8LIY3BLHg/yPojuJQbUgEakniln K0BcV+M2bsK+s/hreqX4aEgzE7z6pqrs1jtHspeA4eQrCGZMCtepg7HRIPkUpdHOXtSF r49IoJUdx6Vn13BepqBul7WOGbMAtKH/fqxe6oj8lnokmvH8kNeogOQkc41aGAGePQhY QQxw== X-Gm-Message-State: AOAM531rx6RALDEoVgCO5pFFpK9+cfI5vSbbiLLy4H8/Jyu0J8mIcq1G Y66qWJDOKNnC+Enz+5oeNDnYWw== X-Received: by 2002:a05:6214:1190:: with SMTP id t16mr33464697qvv.219.1593026477776; Wed, 24 Jun 2020 12:21:17 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id k26sm3854365qki.98.2020.06.24.12.21.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 12:21:17 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.93) (envelope-from ) id 1joAxQ-00DixB-Bk; Wed, 24 Jun 2020 16:21:16 -0300 Date: Wed, 24 Jun 2020 16:21:16 -0300 From: Jason Gunthorpe To: Chris Wilson Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, Andrew Morton , Jan Kara , =?utf-8?B?SsOpcsO0bWU=?= Glisse , John Hubbard , Claudio Imbrenda , "Kirill A . Shutemov" Subject: Re: [PATCH] mm: Skip opportunistic reclaim for dma pinned pages Message-ID: <20200624192116.GO6578@ziepe.ca> References: <20200624191417.16735-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200624191417.16735-1-chris@chris-wilson.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 08:14:17PM +0100, Chris Wilson wrote: > A general rule of thumb is that shrinkers should be fast and effective. > They are called from direct reclaim at the most incovenient of times when > the caller is waiting for a page. If we attempt to reclaim a page being > pinned for active dma [pin_user_pages()], we will incur far greater > latency than a normal anonymous page mapped multiple times. Worse the > page may be in use indefinitely by the HW and unable to be reclaimed > in a timely manner. A pinned page can't be migrated, discarded or swapped by definition - it would cause data corruption. So, how do things even get here and/or work today at all? I think the explanation is missing something important. Jason