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=-5.6 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 A6627C43461 for ; Mon, 14 Sep 2020 18:34:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 23A41208B3 for ; Mon, 14 Sep 2020 18:34:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="G1aFtm6i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23A41208B3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8916D6B0080; Mon, 14 Sep 2020 14:34:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 841B86B0083; Mon, 14 Sep 2020 14:34:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7089F8E0003; Mon, 14 Sep 2020 14:34:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id 593506B0080 for ; Mon, 14 Sep 2020 14:34:45 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 1CF088249980 for ; Mon, 14 Sep 2020 18:34:45 +0000 (UTC) X-FDA: 77262518130.11.size51_2c05b092710a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id E2445180F8B86 for ; Mon, 14 Sep 2020 18:34:44 +0000 (UTC) X-HE-Tag: size51_2c05b092710a X-Filterd-Recvd-Size: 5728 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Sep 2020 18:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600108483; 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=qoDQ2n0CqfZHa9Xxpu2Rfnih0N+SlKozEUzu09fQF50=; b=G1aFtm6i3tmmOGGPPGhvOMY68ZSj76ux6M762HnUc8yjRQZd5NTO53tm/oE4e5MId+prhA /D2VWImPotskXOo3ccFkvFqbDFA/mt+ZbiVlZzGG16e58gWwXMhY/O8Dy29NZ/xm6TqVq2 nRjbEbhIfNkUCx8oZgJZG5u1WMeTmME= 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-512-2h616UPHOnmtiWVir8_hsg-1; Mon, 14 Sep 2020 14:34:40 -0400 X-MC-Unique: 2h616UPHOnmtiWVir8_hsg-1 Received: by mail-qk1-f198.google.com with SMTP id 125so852912qkh.4 for ; Mon, 14 Sep 2020 11:34:40 -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=qoDQ2n0CqfZHa9Xxpu2Rfnih0N+SlKozEUzu09fQF50=; b=ExQ/1MESHTkTvE8x0bezap453ewiPeQ2LG1tkyUmeM55PZHW8lAuWN3J0pT0jVnM7Z dwq6mw6vbqBHKKcY0FOTujaqMzMn/83l5mC8YHg6SvB/8Te4cFsAZA9ML3eudjWJNvji Tl6i2glgVFcU3VP/FD8CwZEh8Ahb1zcVm9hG3r3Nh8PO0qvcklLWhEVhuebIvPdYf09+ GYNcchZKr827N9E76wHjMlUuw9SaLd5nPLqH6NIfNvhxXRGqGMwx0tidieetDEZiPszM qqFYlU9Gfdz5QBxbv0I9ysYd0D9tzb5X2ashtxcDvcxA34oZO1WtOkyfwRinhlAB6XHE dH6Q== X-Gm-Message-State: AOAM533jnydLCFFY3TthcKg9fMsQWbPd7gSO93H+7arfIRDIslKIZQ1x LiaW1rCOdvTkiaey+y44ktmdy9qbxr0PdKQpTPRnzaI6akrEV/40jayG4wHJdt9/dbcpL3qvhyW io9+ROlkQxr0= X-Received: by 2002:a05:620a:5b1:: with SMTP id q17mr14021826qkq.384.1600108479685; Mon, 14 Sep 2020 11:34:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgg3KGB3Cx7ac3y4P5dlwu5/pwToaZolHCYh05g9Q/t03ZMWjqQGk8dssdZSZqTOTuDfNrOA== X-Received: by 2002:a05:620a:5b1:: with SMTP id q17mr14021800qkq.384.1600108479412; Mon, 14 Sep 2020 11:34:39 -0700 (PDT) Received: from xz-x1 (bras-vprn-toroon474qw-lp130-11-70-53-122-15.dsl.bell.ca. [70.53.122.15]) by smtp.gmail.com with ESMTPSA id k72sm13594099qke.121.2020.09.14.11.34.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 11:34:38 -0700 (PDT) Date: Mon, 14 Sep 2020 14:34:36 -0400 From: Peter Xu To: Linus Torvalds Cc: Jason Gunthorpe , Leon Romanovsky , Linux-MM , Linux Kernel Mailing List , "Maya B . Gokhale" , Yang Shi , Marty Mcfadden , Kirill Shutemov , Oleg Nesterov , Jann Horn , Jan Kara , Kirill Tkhai , Andrea Arcangeli , Christoph Hellwig , Andrew Morton Subject: Re: [PATCH 1/4] mm: Trial do_wp_page() simplification Message-ID: <20200914183436.GD30881@xz-x1> References: <20200821234958.7896-1-peterx@redhat.com> <20200821234958.7896-2-peterx@redhat.com> <20200914143829.GA1424636@nvidia.com> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Queue-Id: E2445180F8B86 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 Mon, Sep 14, 2020 at 10:32:11AM -0700, Linus Torvalds wrote: > On Mon, Sep 14, 2020 at 7:38 AM Jason Gunthorpe wrote: > > > > I don't have a detailed explanation right now, but this patch appears > > to be causing a regression where RDMA subsystem tests fail. Tests > > return to normal when this patch is reverted. > > > > It kind of looks like the process is not seeing DMA'd data to a > > pin_user_pages()? > > I'm a nincompoop. I actually _talked_ to Hugh Dickins about this when > he raised concerns, and I dismissed his concerns with "but PAGE_PIN is > special". > > As usual, Hugh was right. Page pinning certainly _is_ special, but > it's not that different from the regular GUP code. > > But in the meantime, I have a lovely confirmation from the kernel test > robot, saying that commit 09854ba94c results in a > "vm-scalability.throughput 31.4% improvement", which was what I was > hoping for - the complexity wasn't just complexity, it was active > badness due to the page locking horrors. > > I think what we want to do is basically do the "early COW", but only > do it for FOLL_PIN (and not turn them into writes for anything but the > COW code). So basically redo the "enforced COW mechanism", but rather > than do it for everything, now do it only for FOLL_PIN, and only in > that COW path. > > Peter - any chance you can look at this? I'm still looking at the page > lock fairness performance regression, although I now think I have a > test patch for Phoronix to test out. Sure, I'll try to prepare something like that and share it shortly. Thanks, -- Peter Xu