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.0 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 479F4C48BE0 for ; Thu, 10 Jun 2021 18:04:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1ED91610A5 for ; Thu, 10 Jun 2021 18:04:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbhFJSGh (ORCPT ); Thu, 10 Jun 2021 14:06:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:33065 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229963AbhFJSGg (ORCPT ); Thu, 10 Jun 2021 14:06:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623348279; 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=CEoL5V4Mmey/+otE2j2URoJUKULpKPt4rB1iuEzrSWg=; b=G6norW3i4bK27LW6BCb6fBgCQx1yBFMpw9I0bWinL1NMtiLwv6uNCH3gwJNc8YdXUraUU0 708WvDvpOGVtvn3Ht61kyV0PkpLgiGCGSdF26qFkcchEqXSm+MhgZAhrfyhOt5+xy6CePH dVIZy3NdrrfEaUVnKIV1BzOVlvZNksE= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-188-oRf-DWo2M_-2fr0ocTPvUg-1; Thu, 10 Jun 2021 14:04:38 -0400 X-MC-Unique: oRf-DWo2M_-2fr0ocTPvUg-1 Received: by mail-qt1-f199.google.com with SMTP id r1-20020ac85c810000b02901fa9798cdb5so370031qta.8 for ; Thu, 10 Jun 2021 11:04:38 -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=CEoL5V4Mmey/+otE2j2URoJUKULpKPt4rB1iuEzrSWg=; b=M1nGGCyeZ/It00AOYKA3NsRpl3lc3JDFqhYPuJnJxtDtq/JAJB+63KuXzVbUIs224K LQoLpWTsFyCc+Y0FVhfEr04V+ezmd/HqX8JmKD5WbmjMyHCPYWGZ19kH1mM5qQcMuOkY RLWvapQddJdwlvfmdt/p0Mj+624SwlM5qhcmaTTBJqovbk6H8Hx3rbMqAGNXVDwRudX2 sag8vSTmPVCXGL2xGtZVi15RPo8PhIJixBXTp7ZqinJ2Lvq9LTLAoWHNul1waIVU7m9M YuzhAj+Y4aTpZ/3SseGbd4PXTS2eBuKBOswV92Ga3ZQN5cuHxmxz5e+3ZjbN52kjgq7s wrag== X-Gm-Message-State: AOAM533UbptPXfk02YpJ2Tmqs6a1C2WhTDwHySk1BG59VQf2gm2KGN4s pv3R5RD21MbdPTtk3+Ku7R4m6lbmz828XsFHFL9waCfnyTiBpEYB10YcqxLzVmO3s5/hWPnwyBW dc3y/pMzFy/hEDra9aheBpsgI X-Received: by 2002:aed:306f:: with SMTP id 102mr3467qte.197.1623348277897; Thu, 10 Jun 2021 11:04:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTTO+KkTdxTZkkMrHOmkbo6ejQaZkDXpeywK0BwU0l5R3cowlkisPdpRInl2BsP3WxC79JBQ== X-Received: by 2002:aed:306f:: with SMTP id 102mr3418qte.197.1623348277505; Thu, 10 Jun 2021 11:04:37 -0700 (PDT) Received: from t490s (bras-base-toroon474qw-grc-88-174-93-75-200.dsl.bell.ca. [174.93.75.200]) by smtp.gmail.com with ESMTPSA id o3sm2731692qkc.93.2021.06.10.11.04.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 11:04:36 -0700 (PDT) Date: Thu, 10 Jun 2021 14:04:35 -0400 From: Peter Xu To: Alistair Popple Cc: linux-mm@kvack.org, akpm@linux-foundation.org, rcampbell@nvidia.com, linux-doc@vger.kernel.org, nouveau@lists.freedesktop.org, hughd@google.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, hch@infradead.org, bskeggs@redhat.com, jgg@nvidia.com, shakeelb@google.com, jhubbard@nvidia.com, willy@infradead.org, Christoph Hellwig Subject: Re: [PATCH v10 07/10] mm: Device exclusive memory access Message-ID: References: <20210607075855.5084-1-apopple@nvidia.com> <270551728.uXnuCZxQlr@nvdebian> <2773835.D95cIkl9rl@nvdebian> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2773835.D95cIkl9rl@nvdebian> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 10, 2021 at 10:18:25AM +1000, Alistair Popple wrote: > > > The main problem is split_huge_pmd_address() unconditionally calls a mmu > > > notifier so I would need to plumb in passing an owner everywhere which could > > > get messy. > > > > Could I ask why? split_huge_pmd_address() will notify with CLEAR, so I'm a bit > > confused why we need to pass over the owner. > > Sure, it is the same reason we need to pass it for the exclusive notifier. > Any invalidation during the make exclusive operation will break the mmu read > side critical section forcing a retry of the operation. The owner field is what > is used to filter out invalidations (such as the exclusive invalidation) that > don't need to be retried. Do you mean the mmu_interval_read_begin|retry() calls? Hmm, the thing is.. to me FOLL_SPLIT_PMD should have similar effect to explicit call split_huge_pmd_address(), afaict. Since both of them use __split_huge_pmd() internally which will generate that unwanted CLEAR notify. If that's the case, I think it fails because split_huge_pmd_address() will trigger that CLEAR notify unconditionally (even if it's not a thp; not sure whether it should be optimized to not notify at all... definitely another story), while FOLL_SPLIT_PMD will skip the notify as it calls split_huge_pmd() instead, who checks the pmd before calling __split_huge_pmd(). Does it also mean that if there's a real THP it won't really work? As then FOLL_SPLIT_PMD will start to trigger that CLEAR notify too, I think.. -- 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.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 E587BC48BD1 for ; Thu, 10 Jun 2021 18:04:42 +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 A64BB613CA for ; Thu, 10 Jun 2021 18:04:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A64BB613CA 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 EEE196E4DD; Thu, 10 Jun 2021 18:04:41 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id C02766E4E8 for ; Thu, 10 Jun 2021 18:04:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623348279; 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=CEoL5V4Mmey/+otE2j2URoJUKULpKPt4rB1iuEzrSWg=; b=G6norW3i4bK27LW6BCb6fBgCQx1yBFMpw9I0bWinL1NMtiLwv6uNCH3gwJNc8YdXUraUU0 708WvDvpOGVtvn3Ht61kyV0PkpLgiGCGSdF26qFkcchEqXSm+MhgZAhrfyhOt5+xy6CePH dVIZy3NdrrfEaUVnKIV1BzOVlvZNksE= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-188-d8z3fL_fOPqeRgsY47iI9Q-1; Thu, 10 Jun 2021 14:04:38 -0400 X-MC-Unique: d8z3fL_fOPqeRgsY47iI9Q-1 Received: by mail-qt1-f197.google.com with SMTP id z20-20020ac845540000b0290248cbf50215so366829qtn.10 for ; Thu, 10 Jun 2021 11:04:38 -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=CEoL5V4Mmey/+otE2j2URoJUKULpKPt4rB1iuEzrSWg=; b=rmGvnoCOklxfvo+4u6PXWZvlqpwCG8QhZkFXKs97hWpTz1asZDm5or8BM3KKiAmP3I TIk7jgl8zOO5Or/lrmHAgrPIeIZBtfDDonCMMyT2OC22aNt+hOP/1RD9BnhrzI59Ui9N lbJQXfuH/S0tOKq39KsyVmeD9eECC5N3FnhMOFdepf+5c3xHAblwMiDcPDspcTzuFvL4 nZP+qpkIxnzD256tA+TvrHv9FIoBIH63AtX8OyoDRqQKu6MYvPuXE1WKe9rrU5tuohB7 MoxkgEVb9yuKjFaYfncA2DaohVP4b7DCsTSVWWGxZ3oH6q0X+Jmhhw8Z0LgkNhppdgDt AEAA== X-Gm-Message-State: AOAM532kpLNuf+ucfjV+n0QijGeYtEO1GlI+PFi+rHxAzGKMaIE770qR oWQrdUZ+liNmHigp2TdYatXdg/KAY2eo9HljU5wIXIQb0MJdozDBEJ36ZAtEHMD0szvIlRBWRF7 oxR+w3aNLs1hTBOafEdLuOJm/9Jt1 X-Received: by 2002:aed:306f:: with SMTP id 102mr3455qte.197.1623348277894; Thu, 10 Jun 2021 11:04:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTTO+KkTdxTZkkMrHOmkbo6ejQaZkDXpeywK0BwU0l5R3cowlkisPdpRInl2BsP3WxC79JBQ== X-Received: by 2002:aed:306f:: with SMTP id 102mr3418qte.197.1623348277505; Thu, 10 Jun 2021 11:04:37 -0700 (PDT) Received: from t490s (bras-base-toroon474qw-grc-88-174-93-75-200.dsl.bell.ca. [174.93.75.200]) by smtp.gmail.com with ESMTPSA id o3sm2731692qkc.93.2021.06.10.11.04.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 11:04:36 -0700 (PDT) Date: Thu, 10 Jun 2021 14:04:35 -0400 From: Peter Xu To: Alistair Popple Subject: Re: [PATCH v10 07/10] mm: Device exclusive memory access Message-ID: References: <20210607075855.5084-1-apopple@nvidia.com> <270551728.uXnuCZxQlr@nvdebian> <2773835.D95cIkl9rl@nvdebian> MIME-Version: 1.0 In-Reply-To: <2773835.D95cIkl9rl@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, hughd@google.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, hch@infradead.org, linux-mm@kvack.org, shakeelb@google.com, bskeggs@redhat.com, jgg@nvidia.com, jhubbard@nvidia.com, akpm@linux-foundation.org, Christoph Hellwig Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Jun 10, 2021 at 10:18:25AM +1000, Alistair Popple wrote: > > > The main problem is split_huge_pmd_address() unconditionally calls a mmu > > > notifier so I would need to plumb in passing an owner everywhere which could > > > get messy. > > > > Could I ask why? split_huge_pmd_address() will notify with CLEAR, so I'm a bit > > confused why we need to pass over the owner. > > Sure, it is the same reason we need to pass it for the exclusive notifier. > Any invalidation during the make exclusive operation will break the mmu read > side critical section forcing a retry of the operation. The owner field is what > is used to filter out invalidations (such as the exclusive invalidation) that > don't need to be retried. Do you mean the mmu_interval_read_begin|retry() calls? Hmm, the thing is.. to me FOLL_SPLIT_PMD should have similar effect to explicit call split_huge_pmd_address(), afaict. Since both of them use __split_huge_pmd() internally which will generate that unwanted CLEAR notify. If that's the case, I think it fails because split_huge_pmd_address() will trigger that CLEAR notify unconditionally (even if it's not a thp; not sure whether it should be optimized to not notify at all... definitely another story), while FOLL_SPLIT_PMD will skip the notify as it calls split_huge_pmd() instead, who checks the pmd before calling __split_huge_pmd(). Does it also mean that if there's a real THP it won't really work? As then FOLL_SPLIT_PMD will start to trigger that CLEAR notify too, I think.. -- 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.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 0F45AC49EA6 for ; Sun, 27 Jun 2021 03:35:00 +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 C6A8E619CB for ; Sun, 27 Jun 2021 03:34:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6A8E619CB 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 262646E079; Sun, 27 Jun 2021 03:34:46 +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 BFA0C6E4DD for ; Thu, 10 Jun 2021 18:04:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623348279; 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=CEoL5V4Mmey/+otE2j2URoJUKULpKPt4rB1iuEzrSWg=; b=G6norW3i4bK27LW6BCb6fBgCQx1yBFMpw9I0bWinL1NMtiLwv6uNCH3gwJNc8YdXUraUU0 708WvDvpOGVtvn3Ht61kyV0PkpLgiGCGSdF26qFkcchEqXSm+MhgZAhrfyhOt5+xy6CePH dVIZy3NdrrfEaUVnKIV1BzOVlvZNksE= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-355-YDGohSZ3P9Gz1oK2oKsJBA-1; Thu, 10 Jun 2021 14:04:38 -0400 X-MC-Unique: YDGohSZ3P9Gz1oK2oKsJBA-1 Received: by mail-qt1-f199.google.com with SMTP id d7-20020ac811870000b02901e65f85117bso345708qtj.18 for ; Thu, 10 Jun 2021 11:04:38 -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=CEoL5V4Mmey/+otE2j2URoJUKULpKPt4rB1iuEzrSWg=; b=VTx3DAABTRb+ZBp9b9Tx8u0zhDffSs+Qlug4GtZP99AU0t9Qf3ecx9eUrLr9Ww7t9a 4YAWUDfn/2y3iBf/CPstAondVJEbW44hGXHSusTU1KOuKz0vscFJg19CmWWa3mQwrJwE n0rHjl92ccoc8XA0tJI6mvxJBzsYeURtH1ct1j865pHtsdcKYgqx7Q5TwWwQ8ZsY+MOP oI3IpQiBWB720CEKI0fdpLkHymEZOH54Lr2okcgFA/NqAEw5PY4cLOZi+rBmF9cnYw7V v/yijEfz/srplwuFvlR0eFcW95uM/bMqxGcWKKhg7uPfeJLhu4awG+y4fWu4DweXI4bu xinQ== X-Gm-Message-State: AOAM531Eu5gf1BwPBJzhAJEcmmuUMcgoDp4bB1A6IegegcLNk/reLs5M vVYWq8HexrrtSoK28nktXe5gcGfNctbovk5TC/0MpBMB3kdGiGT0X8Z2iSuP5+21sGwXdUNKqnl 9pU2NCm3W2Ca747pYGh4OYhjWaA== X-Received: by 2002:aed:306f:: with SMTP id 102mr3458qte.197.1623348277896; Thu, 10 Jun 2021 11:04:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTTO+KkTdxTZkkMrHOmkbo6ejQaZkDXpeywK0BwU0l5R3cowlkisPdpRInl2BsP3WxC79JBQ== X-Received: by 2002:aed:306f:: with SMTP id 102mr3418qte.197.1623348277505; Thu, 10 Jun 2021 11:04:37 -0700 (PDT) Received: from t490s (bras-base-toroon474qw-grc-88-174-93-75-200.dsl.bell.ca. [174.93.75.200]) by smtp.gmail.com with ESMTPSA id o3sm2731692qkc.93.2021.06.10.11.04.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 11:04:36 -0700 (PDT) Date: Thu, 10 Jun 2021 14:04:35 -0400 From: Peter Xu To: Alistair Popple Message-ID: References: <20210607075855.5084-1-apopple@nvidia.com> <270551728.uXnuCZxQlr@nvdebian> <2773835.D95cIkl9rl@nvdebian> MIME-Version: 1.0 In-Reply-To: <2773835.D95cIkl9rl@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: Sun, 27 Jun 2021 03:34:44 +0000 Subject: Re: [Nouveau] [PATCH v10 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, hughd@google.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, hch@infradead.org, linux-mm@kvack.org, shakeelb@google.com, bskeggs@redhat.com, jgg@nvidia.com, akpm@linux-foundation.org, Christoph Hellwig Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On Thu, Jun 10, 2021 at 10:18:25AM +1000, Alistair Popple wrote: > > > The main problem is split_huge_pmd_address() unconditionally calls a mmu > > > notifier so I would need to plumb in passing an owner everywhere which could > > > get messy. > > > > Could I ask why? split_huge_pmd_address() will notify with CLEAR, so I'm a bit > > confused why we need to pass over the owner. > > Sure, it is the same reason we need to pass it for the exclusive notifier. > Any invalidation during the make exclusive operation will break the mmu read > side critical section forcing a retry of the operation. The owner field is what > is used to filter out invalidations (such as the exclusive invalidation) that > don't need to be retried. Do you mean the mmu_interval_read_begin|retry() calls? Hmm, the thing is.. to me FOLL_SPLIT_PMD should have similar effect to explicit call split_huge_pmd_address(), afaict. Since both of them use __split_huge_pmd() internally which will generate that unwanted CLEAR notify. If that's the case, I think it fails because split_huge_pmd_address() will trigger that CLEAR notify unconditionally (even if it's not a thp; not sure whether it should be optimized to not notify at all... definitely another story), while FOLL_SPLIT_PMD will skip the notify as it calls split_huge_pmd() instead, who checks the pmd before calling __split_huge_pmd(). Does it also mean that if there's a real THP it won't really work? As then FOLL_SPLIT_PMD will start to trigger that CLEAR notify too, I think.. -- Peter Xu _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau