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=-6.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 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 A371AC47083 for ; Fri, 4 Jun 2021 15:20:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8376C61400 for ; Fri, 4 Jun 2021 15:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230173AbhFDPWk (ORCPT ); Fri, 4 Jun 2021 11:22:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36965 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230034AbhFDPWj (ORCPT ); Fri, 4 Jun 2021 11:22:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622820053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4AbIlLedm5Mu+ovdpvNjPfOsXH7m99kQNtIejaRsUUU=; b=eBAIu4T1v2QMvm5Oc0+dXshQ8vnZHsUuw4qfpirqoXOCAVcHRay+mAON9Tyh2/tQGk2AmK vZD4Iu75ZF6sNhXHpjdcDtglxmoMkdfdBnpbldxw8vtW+W0Yks+oPrXU9MaAww+3bcxjK0 dZ/xXzz7P1EQxXY80VUkbq53xX8kq9E= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-rI4OJIZNMMWZySINOyA0UQ-1; Fri, 04 Jun 2021 11:20:51 -0400 X-MC-Unique: rI4OJIZNMMWZySINOyA0UQ-1 Received: by mail-qk1-f198.google.com with SMTP id e8-20020a05620a2088b02903a5edeec4d6so6801971qka.11 for ; Fri, 04 Jun 2021 08:20:51 -0700 (PDT) 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=4AbIlLedm5Mu+ovdpvNjPfOsXH7m99kQNtIejaRsUUU=; b=qDKeyaz0BygRmMdjLNbW6B3m8kqo34huSxo0iRVOE7SfHTB3NjPSveHOiAyQiwRPjk IsSUMAccKt+wiY+bezUOZKChK8euntbKcMw+eazBqpc/onwUiegWY7kQkn0UNb/5bQ4G O1dOux7gPjcXkCRGfVKO9CP/7b3l+G6SwhzG+nZCPFdXINGedXkhPrOgZOUIfuqoaLTv i7xNQsHZ3I6dKs2DcyLzQjwWK8CjENa2gXMf4fMGr5D81/VidjCl9ixpAxdhpdHui7ID JZVq77dcHJRm1s2bv8q76HLLrDWLI/ZSFrIAni2THeBRHb3+QgJDodKGja2gW1HUCdGm dYIQ== X-Gm-Message-State: AOAM533AnQS2dgFf8P9MZw3/r8ugwOT5mmoEhPvDsXkEyBtffswuSVQb s6e508wE/NvnQhtW5lTSQxtzrEnxSI0gXwrLQOYAPsqXX5BapOes4dq38klSKkbqhL0oou/sr8g Bj5Ui0CDbEZbftXFYzgTP16mo X-Received: by 2002:a37:911:: with SMTP id 17mr2506621qkj.436.1622820051403; Fri, 04 Jun 2021 08:20:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSkb15icJCjCC2a0yzUkFB8Tk/1b3Gxyat2dgZri3GuoK2EOI4ZaPq1ePBkTLwQGSCPYLtvg== X-Received: by 2002:a37:911:: with SMTP id 17mr2506604qkj.436.1622820051225; Fri, 04 Jun 2021 08:20:51 -0700 (PDT) Received: from t490s (bras-base-toroon474qw-grc-61-184-147-118-108.dsl.bell.ca. [184.147.118.108]) by smtp.gmail.com with ESMTPSA id x9sm3701082qtf.76.2021.06.04.08.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 08:20:50 -0700 (PDT) Date: Fri, 4 Jun 2021 11:20:49 -0400 From: Peter Xu To: Alistair Popple Cc: Balbir Singh , John Hubbard , Andrew Morton , linux-mm@kvack.org, nouveau@lists.freedesktop.org, bskeggs@redhat.com, rcampbell@nvidia.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, hch@infradead.org, jglisse@redhat.com, willy@infradead.org, jgg@nvidia.com, hughd@google.com, Christoph Hellwig Subject: Re: [PATCH v9 07/10] mm: Device exclusive memory access Message-ID: References: <20210524132725.12697-1-apopple@nvidia.com> <3853054.AI2YdRgKcH@nvdebian> <10231977.pWpf7cJbZl@nvdebian> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <10231977.pWpf7cJbZl@nvdebian> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 04, 2021 at 11:07:42AM +1000, Alistair Popple wrote: > On Friday, 4 June 2021 12:47:40 AM AEST Peter Xu wrote: > > External email: Use caution opening links or attachments > > > > On Thu, Jun 03, 2021 at 09:39:32PM +1000, Alistair Popple wrote: > > > Reclaim won't run on the page due to the extra references from the special > > > swap entries. > > > > That sounds reasonable, but I didn't find the point that stops it, probably > > due to my limited knowledge on the reclaim code. Could you elaborate? > > Sure, it isn't immediately obvious but it ends up being detected at the start > of is_page_cache_freeable() in the pageout code: > > > static pageout_t pageout(struct page *page, struct address_space *mapping) > { > > [...] > > if (!is_page_cache_freeable(page)) > return PAGE_KEEP; I did look at pageout() but still missed this small helper indeed (while it's so important to know..), thanks! -- Peter Xu 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.5 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 79B8FC4708F for ; Fri, 4 Jun 2021 15:34:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 3A22261402 for ; Fri, 4 Jun 2021 15:34:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A22261402 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=nouveau-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 596F96E9F8; Fri, 4 Jun 2021 15:34:14 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBC536F617 for ; Fri, 4 Jun 2021 15:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622820055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4AbIlLedm5Mu+ovdpvNjPfOsXH7m99kQNtIejaRsUUU=; b=aeqKdawg7sPeFs5OAk/SZXNhGlTx0+oUowDFRIqBJlbei1qvU7oefc7LKk7MjK621tZebS iTKdhb46fY2pfj6P/zWd/cqLVJgaSXXMMuqrvDLycyJVSFcUdEtnYUNpPbr4g06Qgk/tdu uFLbyEB8tl/hcZHUEcF5An6yyjXiZyk= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-343-J4Ihykw8M9SmR0zV_mWeIA-1; Fri, 04 Jun 2021 11:20:51 -0400 X-MC-Unique: J4Ihykw8M9SmR0zV_mWeIA-1 Received: by mail-qk1-f198.google.com with SMTP id o6-20020a05620a1106b02903a9f97c808bso4000061qkk.1 for ; Fri, 04 Jun 2021 08:20:51 -0700 (PDT) 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=4AbIlLedm5Mu+ovdpvNjPfOsXH7m99kQNtIejaRsUUU=; b=UFakhNpU3OMuB1woS9Yx0T5GYtNYwBPMMP3tbC86VvcIV3xtRZE1LiKo30XaeN0RAB JfHuOhhdrzQBIN7jINizS9/8VD4WpSxr7Dfc7Kd+BAbyA2MS93lTK/ZUtmobwoOqQW2x mQun2ivRIbpEpRhN9SJMKtE1ILI5e6ChDYWheS8NXpSJ1vbMf0Jy9ruT4QELFcYmqdNf C+este3Gj7VRpVVUKuzoSMqI5Drlq4gvk7e7xv9gwHsSoSk39VdAxmx2IkqEPLwhPG42 DXxGlvfCIxaKuoCCrRZpbIMuz9VYvqWIKVc4+B3tDaydFpYYvGaxyVvze9BQoarPTtEn EYkA== X-Gm-Message-State: AOAM531XPXyhOtTCZj9l9of4Ak5G+0oFWSw7f0JXFOSWCMsQQjG3D+jB m+JSkWeSfiKqpqg2Cm7xPtl+PLJoRLuXb0y9Tmnc0vGwMYO0DtrocbLXt98vdcWIOilTNsuC2JB F5/f7IRrkgVVFRHFEPlVUcYRqbg== X-Received: by 2002:a37:911:: with SMTP id 17mr2506635qkj.436.1622820051431; Fri, 04 Jun 2021 08:20:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSkb15icJCjCC2a0yzUkFB8Tk/1b3Gxyat2dgZri3GuoK2EOI4ZaPq1ePBkTLwQGSCPYLtvg== X-Received: by 2002:a37:911:: with SMTP id 17mr2506604qkj.436.1622820051225; Fri, 04 Jun 2021 08:20:51 -0700 (PDT) Received: from t490s (bras-base-toroon474qw-grc-61-184-147-118-108.dsl.bell.ca. [184.147.118.108]) by smtp.gmail.com with ESMTPSA id x9sm3701082qtf.76.2021.06.04.08.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 08:20:50 -0700 (PDT) Date: Fri, 4 Jun 2021 11:20:49 -0400 From: Peter Xu To: Alistair Popple Message-ID: References: <20210524132725.12697-1-apopple@nvidia.com> <3853054.AI2YdRgKcH@nvdebian> <10231977.pWpf7cJbZl@nvdebian> MIME-Version: 1.0 In-Reply-To: <10231977.pWpf7cJbZl@nvdebian> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Mailman-Approved-At: Fri, 04 Jun 2021 15:34:13 +0000 Subject: Re: [Nouveau] [PATCH v9 07/10] mm: Device exclusive memory access X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rcampbell@nvidia.com, willy@infradead.org, linux-doc@vger.kernel.org, nouveau@lists.freedesktop.org, Balbir Singh , hughd@google.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, hch@infradead.org, linux-mm@kvack.org, bskeggs@redhat.com, jgg@nvidia.com, Andrew Morton , Christoph Hellwig Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On Fri, Jun 04, 2021 at 11:07:42AM +1000, Alistair Popple wrote: > On Friday, 4 June 2021 12:47:40 AM AEST Peter Xu wrote: > > External email: Use caution opening links or attachments > > > > On Thu, Jun 03, 2021 at 09:39:32PM +1000, Alistair Popple wrote: > > > Reclaim won't run on the page due to the extra references from the special > > > swap entries. > > > > That sounds reasonable, but I didn't find the point that stops it, probably > > due to my limited knowledge on the reclaim code. Could you elaborate? > > Sure, it isn't immediately obvious but it ends up being detected at the start > of is_page_cache_freeable() in the pageout code: > > > static pageout_t pageout(struct page *page, struct address_space *mapping) > { > > [...] > > if (!is_page_cache_freeable(page)) > return PAGE_KEEP; I did look at pageout() but still missed this small helper indeed (while it's so important to know..), thanks! -- Peter Xu _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau 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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 A7E4AC4708F for ; Fri, 4 Jun 2021 15:20:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 71F3C61400 for ; Fri, 4 Jun 2021 15:20:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71F3C61400 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E03576F617; Fri, 4 Jun 2021 15:20:57 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6FD276F617 for ; Fri, 4 Jun 2021 15:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622820055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4AbIlLedm5Mu+ovdpvNjPfOsXH7m99kQNtIejaRsUUU=; b=aeqKdawg7sPeFs5OAk/SZXNhGlTx0+oUowDFRIqBJlbei1qvU7oefc7LKk7MjK621tZebS iTKdhb46fY2pfj6P/zWd/cqLVJgaSXXMMuqrvDLycyJVSFcUdEtnYUNpPbr4g06Qgk/tdu uFLbyEB8tl/hcZHUEcF5An6yyjXiZyk= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-311-FozbT41iPZiPsLXbBrscBg-1; Fri, 04 Jun 2021 11:20:51 -0400 X-MC-Unique: FozbT41iPZiPsLXbBrscBg-1 Received: by mail-qk1-f199.google.com with SMTP id z12-20020a05620a08ccb02902ea1e4a963dso6807848qkz.13 for ; Fri, 04 Jun 2021 08:20:51 -0700 (PDT) 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=4AbIlLedm5Mu+ovdpvNjPfOsXH7m99kQNtIejaRsUUU=; b=UHxI3fzyg582t5SVHbMZ2BV2BxwA6RYDsZuB+NCeEgFa77nU+Anx+VZEndiU3r4HCo UOiZIYFzJPzgTuQq8Y//muXFaHwlyzMgtfsrxu9rh5eWMHtekl6xJbPk0FUOCyrd4WNO Tt/pc9DZxbwKNHAYdRzEY06onbMn1n9O4VDl4+S8YUTB27JPhkz2+/+uF9TMs1u74q4r MUE4//uOacWsK90+6iHykgZYodg3XJnSADAEe6qLDgEmQVCLPADiy0AMJyzloZeAHYbo YxqcJSju9Xq+du/qGv46cgiveJh6S35R1lVGB69dgyzhcS3uhaF5j4KHltfkodich69i W9nw== X-Gm-Message-State: AOAM53370BzIA/sRHM2KQ5975qPZ3ZeI98uLZpnD3my5oqsWlSghkmwS i1+xUgIhrQfcVG3n+y6ase+MUwG5UXAC4LwTHl2XOH+JrTUqqtP+2r2/xUtkhKnvH0HZ+rwMd1b oYiYI2K5VeFBkb6wlc0Z3CkogyodZ X-Received: by 2002:a37:911:: with SMTP id 17mr2506634qkj.436.1622820051429; Fri, 04 Jun 2021 08:20:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSkb15icJCjCC2a0yzUkFB8Tk/1b3Gxyat2dgZri3GuoK2EOI4ZaPq1ePBkTLwQGSCPYLtvg== X-Received: by 2002:a37:911:: with SMTP id 17mr2506604qkj.436.1622820051225; Fri, 04 Jun 2021 08:20:51 -0700 (PDT) Received: from t490s (bras-base-toroon474qw-grc-61-184-147-118-108.dsl.bell.ca. [184.147.118.108]) by smtp.gmail.com with ESMTPSA id x9sm3701082qtf.76.2021.06.04.08.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 08:20:50 -0700 (PDT) Date: Fri, 4 Jun 2021 11:20:49 -0400 From: Peter Xu To: Alistair Popple Subject: Re: [PATCH v9 07/10] mm: Device exclusive memory access Message-ID: References: <20210524132725.12697-1-apopple@nvidia.com> <3853054.AI2YdRgKcH@nvdebian> <10231977.pWpf7cJbZl@nvdebian> MIME-Version: 1.0 In-Reply-To: <10231977.pWpf7cJbZl@nvdebian> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rcampbell@nvidia.com, willy@infradead.org, linux-doc@vger.kernel.org, nouveau@lists.freedesktop.org, Balbir Singh , hughd@google.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, hch@infradead.org, linux-mm@kvack.org, jglisse@redhat.com, bskeggs@redhat.com, jgg@nvidia.com, John Hubbard , Andrew Morton , Christoph Hellwig Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Jun 04, 2021 at 11:07:42AM +1000, Alistair Popple wrote: > On Friday, 4 June 2021 12:47:40 AM AEST Peter Xu wrote: > > External email: Use caution opening links or attachments > > > > On Thu, Jun 03, 2021 at 09:39:32PM +1000, Alistair Popple wrote: > > > Reclaim won't run on the page due to the extra references from the special > > > swap entries. > > > > That sounds reasonable, but I didn't find the point that stops it, probably > > due to my limited knowledge on the reclaim code. Could you elaborate? > > Sure, it isn't immediately obvious but it ends up being detected at the start > of is_page_cache_freeable() in the pageout code: > > > static pageout_t pageout(struct page *page, struct address_space *mapping) > { > > [...] > > if (!is_page_cache_freeable(page)) > return PAGE_KEEP; I did look at pageout() but still missed this small helper indeed (while it's so important to know..), thanks! -- Peter Xu