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.9 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 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 AA743C43461 for ; Mon, 14 Sep 2020 17:32:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C3D6217BA for ; Mon, 14 Sep 2020 17:32:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="U9lHjJaT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C3D6217BA 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 4ED4B6B0087; Mon, 14 Sep 2020 13:32:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 476B26B0088; Mon, 14 Sep 2020 13:32:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3181B900009; Mon, 14 Sep 2020 13:32:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0248.hostedemail.com [216.40.44.248]) by kanga.kvack.org (Postfix) with ESMTP id 15A1F6B0087 for ; Mon, 14 Sep 2020 13:32:33 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C9095181AEF15 for ; Mon, 14 Sep 2020 17:32:32 +0000 (UTC) X-FDA: 77262361344.30.form09_3f051552710a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 96520180B3C85 for ; Mon, 14 Sep 2020 17:32:32 +0000 (UTC) X-HE-Tag: form09_3f051552710a X-Filterd-Recvd-Size: 5107 Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Sep 2020 17:32:32 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id u4so358227ljd.10 for ; Mon, 14 Sep 2020 10:32:31 -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=3xtDFEIrvwA/6L1bjyoorbZAuxfj/GqXppLxNbWixgs=; b=U9lHjJaTQ2ejYDJEjf9MUl/d/ihUqXM/TqkzXUb4AZOxhoEk7TVNn0COhc84RxSaLV 3+pcJlf0crqOlq4vrcIb8dqZd4MQ0SeI25NKoH0hAKjXq1cgkB4ZXEqDD1m0tRBT8ip6 SQGeknRq4aJyT20tR2LNEMQ0JT7ImcwsFJHlo= 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=3xtDFEIrvwA/6L1bjyoorbZAuxfj/GqXppLxNbWixgs=; b=S4PwnpfFYRccKowTufOETSwnKcfXNEK/3oF2aBhH4UIdIXp++a7pGO1dgKEXPmbJGz KtIIUD/5OKJv+zbaItHopbUfeYFuQn4yKSq1lP2BIjbtxSbRtor8M5ueZHSrg6fZaLkB 8++LJbqXUDxkEtTuHAEXWDEMWyAfWgS4KWyQwXVgrGvQGET25dWq38uyL7iqSDd66MPv CLQjC07SG1W38IsMhNfzhSuhdgkJ3As6hZGGUAQC72sZ39cf4w6Quq0wYL5LJVYkE5AJ gWsWhrBcK/27DDag8QAsRD356MVkzgfC5dSfZzgc7Y48DmlX/KI3ikY9kBqXGV1fc12X H3/w== X-Gm-Message-State: AOAM531+NlMwdPTR13B7koJLIG8XHEEWeuAZOsQRjhMRx+rnsygQ+OVP zG2e7XO3jAfaNpbrUu0zq4e92Po5tn36Rg== X-Google-Smtp-Source: ABdhPJw96L5i2AznF/hIevQKzwnURIUomiAj/i3I0kRgOT+yAzBvhWjETK9lbZnDCq0Bc+IWL0ct3w== X-Received: by 2002:a2e:8541:: with SMTP id u1mr5921560ljj.101.1600104749849; Mon, 14 Sep 2020 10:32:29 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id s4sm4160017lja.124.2020.09.14.10.32.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Sep 2020 10:32:28 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id c2so345339ljj.12 for ; Mon, 14 Sep 2020 10:32:28 -0700 (PDT) X-Received: by 2002:a05:651c:32e:: with SMTP id b14mr4983630ljp.314.1600104747758; Mon, 14 Sep 2020 10:32:27 -0700 (PDT) MIME-Version: 1.0 References: <20200821234958.7896-1-peterx@redhat.com> <20200821234958.7896-2-peterx@redhat.com> <20200914143829.GA1424636@nvidia.com> In-Reply-To: <20200914143829.GA1424636@nvidia.com> From: Linus Torvalds Date: Mon, 14 Sep 2020 10:32:11 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] mm: Trial do_wp_page() simplification To: Jason Gunthorpe Cc: Peter Xu , 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 Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 96520180B3C85 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 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. Linus