Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp89224pxf; Wed, 17 Mar 2021 16:17:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymiTgwFz0dRGfuAAvu9wrNjL626QrqcAO345vkCXM49bUm7ajmwU/12W4XvSO5pZD/DFPi X-Received: by 2002:a17:907:2062:: with SMTP id qp2mr38073672ejb.397.1616023063709; Wed, 17 Mar 2021 16:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616023063; cv=none; d=google.com; s=arc-20160816; b=Q3IrwRdLuvMKx8nUplLvudWibju0+/9MKsA/AruZLDtfSGBTzUGd/2+VXNXxcepue7 GhAfXcHvyR73pdwNC3gdYp/5hi5zHE4mvPy4ETJplTJFviqfdYZejGPBq9D75BqnZmUx OlwAWnK3hX+yXTosqinx6PRGZ22RfpMcwDShR6J6xrJZzyVsNc41HNK+GkVGYAboNl5r 5MjwvOustz+tUwCXE2C2AIItGpb5zG7EqMVwvr8udjiDT9Ynpfot2QzJXino859s5E8z ebEDifEBet4MUPkoWReRgTUh2vftmR2e+GPy7TOCy1XvC2g+RLBXRPVWfXtw3cDWyo2o Cgjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=YVkqRMI0ahGC11V2DRBFaX+v+O88uX9jjkq1wIMGDAA=; b=lEGviYqNuRWrXzCsLojhms1JR22NRYRXEO7VssrGrk66TmyikYIG7wgGATL67l/Onj 2bTY91qV33zyEOBmzYLb4JFpaopqP/MBjkN6nJ82qSeE2GME65ZtTAcsTS1aNwr6OuMa NlboFquOx/2+3LtBHGBL+nRseB/A7QherC9C4nsv5IUyYs5u4N9DDEyhDBgGErWAsbO1 6u81l5ydttxe6ljQa7OLaZkrmr+2uAtxwYe0G33fF8Z/WXxsRfoWcz+afTpShKNdix+t uW4ZywkSscL0QR5J9vzt46lgCIE+MtOheujGw0ABi950alTRb0VwokxJI8VAKZDv4K17 fQeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Ch+F8nNR; 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 m12si159765ejx.720.2021.03.17.16.17.19; Wed, 17 Mar 2021 16:17:43 -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=@linux-foundation.org header.s=google header.b=Ch+F8nNR; 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 S229512AbhCQXOV (ORCPT + 99 others); Wed, 17 Mar 2021 19:14:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbhCQXNx (ORCPT ); Wed, 17 Mar 2021 19:13:53 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2561AC06174A for ; Wed, 17 Mar 2021 16:13:53 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id z25so5252143lja.3 for ; Wed, 17 Mar 2021 16:13:53 -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=YVkqRMI0ahGC11V2DRBFaX+v+O88uX9jjkq1wIMGDAA=; b=Ch+F8nNRlTfyjKAzofL0cRwItdfovAzFW7vYbLgWJ7xrQTXk7DiWE93fE7uPfozHZf A4TV8T22Cy1l3ongzr77Az2/3rCrZbd3jSEpZPhmbqJB6nYUoFHh+cb4QSsDLbfFg0Xl reW8e+tbp0A5ukHDSbKerzC74d2cKhUotxw8U= 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=YVkqRMI0ahGC11V2DRBFaX+v+O88uX9jjkq1wIMGDAA=; b=lNkw89t6nvMnnlOlpiBTGdH9LqQIRgrcZdniauCvjroO5ChInUBExvRAdfk74qJ+fW sl9xoBCgtW8zV2TWaop0BGDwTGX3qUi+Wv1E0sh1DFSz5HDKHQyt6jfM7Hx5yWQ7jINY GE3lkTRIQQAnSW+BJy3i6RLR9q5eavWvNRTqwF5CMseshQyN5Qdt0W/sJ/8Y4s+0LPwE IwoPAd/FBY9QY9/AyjXshWN8ABy9nOngUDWPckLO8tGTGVqF+aEOQNbpfC6iok5bHY3i xDtj4GPnDR2wOCJ//lonm/M5DlYUYdoZOAu5b29ieFQMTmoumaeFn9p5IarM0Q+PZYFE p6Eg== X-Gm-Message-State: AOAM531uk5iW41Bk1z79xxOEpl6ulNzk1cUebLNTpNGg/7kA5G6KLpZE rf7B4ofXrQCt2DYIYw7hf12Ssa29VdZdug== X-Received: by 2002:a2e:921a:: with SMTP id k26mr3209251ljg.149.1616022830796; Wed, 17 Mar 2021 16:13:50 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id d13sm18849lfi.247.2021.03.17.16.13.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Mar 2021 16:13:48 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id s17so5248771ljc.5 for ; Wed, 17 Mar 2021 16:13:48 -0700 (PDT) X-Received: by 2002:a2e:864d:: with SMTP id i13mr3572254ljj.48.1616022828351; Wed, 17 Mar 2021 16:13:48 -0700 (PDT) MIME-Version: 1.0 References: <20210317075427.587806-1-npiggin@gmail.com> <89cb49c0-2736-dd4c-f401-4b88c22cc11f@rasmusvillemoes.dk> <1615977781.fijkhk7ep5.astroid@bobo.none> <1616017462.cmzed2nj60.astroid@bobo.none> In-Reply-To: <1616017462.cmzed2nj60.astroid@bobo.none> From: Linus Torvalds Date: Wed, 17 Mar 2021 16:13:32 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] Increase page and bit waitqueue hash size To: Nicholas Piggin Cc: Andrew Morton , Anton Blanchard , Linux Kernel Mailing List , Linux-MM , Rasmus Villemoes , Ingo Molnar Content-Type: multipart/mixed; boundary="000000000000a26ca905bdc3a235" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000a26ca905bdc3a235 Content-Type: text/plain; charset="UTF-8" On Wed, Mar 17, 2021 at 3:23 PM Nicholas Piggin wrote: > > Might take some time to get a system and run tests. We actually had > difficulty recreating it before this patch too, so it's kind of > hard to say _that_ was the exact case that previously ran badly and > is now fixed. We thought just the statistical nature of collisions > and page / lock contention made things occasionally line up and > tank. Yeah, it probably depends a lot on the exact page allocation patterns and just bad luck. Plus the actual spinlocks will end up with false sharing anyway, so you might need to have both contention on multiple pages on the same hash queue _and_ perhaps some action on other pages that just hash close-by so that they make the cache coherency protocol have to work harder.. And then 99% of the time it all just works out fine, because we only need to look at the hashed spinlocks when we have any contention on the page lock in the first place, and that generally should be something we should avoid for other reasons. But it is perhaps also a sign that while 256 entries is "ridiculously small", it might be the case that it's not necessarily much of a real problem in the end, and I get the feeling that growing it by several orders of magnitude is overkill. In fact, the problems we have had with the page wait queue have often been because we did too much page locking in the first place. I actually have a couple of patches in my "still thinking about it tree" (that have been there for six months by now, so maybe not thinking too _actively_ about it) which remove some overly stupid page locking. For example, look at "do_shared_fault()". Currently __do_fault() always locks the result page. Then if you have a page_mkwrite() function, we immediately unlock it again. And then we lock it again in do_page_mkwrite(). Does that particular case matter? I really have no idea. But we basically lock it twice for what looks like absolutely zero reason other than calling conventions. Bah. I'll just attach my three "not very actively thinking about it" patches here in case anybody else wants to not actively think about them. I've actually been running these on my own machine since October, since the kernel I actually boot on my main desktop always includes my "thinking about it" patches. The two first patches should fix the double lock thing I mentioned. The third patch should be a no-op right now, but the thinking is outlined in the commit message: why do we even lock pages in filemap_fault? I'm not actually convinced we need to. I think we could return an unputodate page unlocked, and instead do the checking at pte install time (I had some discussions with Kirill about instead doing it at pte install time, and depending entirely on memory ordering constraints wrt page truncation that *does* take the page lock, and then does various other checks - including the page mapcount and taking the ptl lock - under that lock). Anyway, I don't mind the "make the hash table larger" regardless of this, but I do want it to be documented a bit more. Linus --000000000000a26ca905bdc3a235 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-mm-move-final-page-locking-out-of-__do_fault-helper-.patch" Content-Disposition: attachment; filename="0001-mm-move-final-page-locking-out-of-__do_fault-helper-.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kme1xgj00 RnJvbSBlZmRjM2ZlYWRiNDkzYWU3ZjI0YzU3M2M4Yjg2M2Q3YTUxMTE3MzkxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaW51cyBUb3J2YWxkcyA8dG9ydmFsZHNAbGludXgtZm91bmRh dGlvbi5vcmc+CkRhdGU6IFR1ZSwgMTMgT2N0IDIwMjAgMTA6MjI6MDAgLTA3MDAKU3ViamVjdDog W1BBVENIIDEvM10gbW06IG1vdmUgZmluYWwgcGFnZSBsb2NraW5nIG91dCBvZiBfX2RvX2ZhdWx0 KCkgaGVscGVyCiBpbnRvIGNhbGxlcnMKClRoZSBvbGQgc2VtYW50aWNzIG9mIG91ciBfX2RvX2Zh dWx0KCkgaGVscGVyIHdhcyB0aGF0IGl0IGFsd2F5cyBsb2NrZWQKdGhlIHBhZ2UgdW5sZXNzIHRo ZXJlIHdhcyBhbiB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YmxlCi0tIAoyLjMwLjAuMzUyLmdmNmEw NTY4NGU2Cgo= --000000000000a26ca905bdc3a235 Content-Type: text/x-patch; charset="US-ASCII"; name="0002-mm-don-t-lock-the-page-only-to-immediately-unlock-it.patch" Content-Disposition: attachment; filename="0002-mm-don-t-lock-the-page-only-to-immediately-unlock-it.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kme1xjgl1 RnJvbSAxYjJiMDYxZjYyMmVhNjA5MjRlYmE4ODY5NzUxODMzMDZhYTU2OTcyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaW51cyBUb3J2YWxkcyA8dG9ydmFsZHNAbGludXgtZm91bmRh dGlvbi5vcmc+CkRhdGU6IFR1ZSwgMTMgT2N0IDIwMjAgMTA6NDM6MDUgLTA3MDAKU3ViamVjdDog W1BBVENIIDIvM10gbW06IGRvbid0IGxvY2sgdGhlIHBhZ2UsIG9ubHkgdG8gaW1tZWRpYXRlbHkg dW5sb2NrIGl0CiBhZ2FpbiBmb3IgZG9fcGFnZV9ta3dyaXRlKCkKCk91ciBwYWdlIGxvY2tpbmcg ZHVyaW5nIGZhdWx0IGhhbmRsaW5nIGEgYml0IG1lc3N5LCBhbmQgdGhlIHNoYXJlZCBmYXVsdApj b2RlIGluIHBhcnRpY3VsYXIgd2FzIGxvY2tpbmcgdGhlIHBhZ2Ugb25seSB0byBpbW1lZGlhdGVs eSB1bmxvY2sgaXQKYWdhaW4gYmVjYXVzZSBkb19wYWdlX21rd3JpdGUoKSB3YW50ZWQgaXQgdW5s b2NrZWQuCgpXZSBrZWVwIHRoZSAiZGlkIHdlIGxvY2sgaXQiIHN0YXRlIGFyb3VuZCBpbiB0aGUg Vk1fRkFVTFRfTE9DS0VEIGJpdCwgc28KbGV0J3MganVzdCB1c2UgdGhhdCBrbm93bGVkZ2UsIGFu ZCBub3QgZmlyc3QgbG9jayBpdCBpZiBpdCB3YXNuJ3QKbG9ja2VkLCBvbmx5IHRvIH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gfCBWTV9GQVVMVF9OT1BBR0UgfAog CQkJCQlWTV9GQVVMVF9SRVRSWSkpKSB7Ci0tIAoyLjMwLjAuMzUyLmdmNmEwNTY4NGU2Cgo= --000000000000a26ca905bdc3a235 Content-Type: text/x-patch; charset="US-ASCII"; name="0003-mm-do_cow_fault-does-not-need-the-source-page-to-be-.patch" Content-Disposition: attachment; filename="0003-mm-do_cow_fault-does-not-need-the-source-page-to-be-.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kme1xm4i2 RnJvbSA3Y2Y1YWQ4MTY0MTIxNGQyYzRiYjY0MDRiNjQ0MzZhNzg3NzkxNzQ5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaW51cyBUb3J2YWxkcyA8dG9ydmFsZHNAbGludXgtZm91bmRh dGlvbi5vcmc+CkRhdGU6IFR1ZSwgMTMgT2N0IDIwMjAgMTE6MDA6MzMgLTA3MDAKU3ViamVjdDog W1BBVENIIDMvM10gbW06IGRvX2Nvd19mYXVsdCgpIGRvZXMgbm90IG5lZWQgdGhlIHNvdXJjZSBw YWdlIHRvIGJlCiBsb2NrZWQKClRoaXMgcmVtb3ZlcyB0aGUgImxvY2sgaWYgaXQgd2Fzbid0IGxv Y2tlZCIgbG9naWMgZnJvbSBkb19jb3dfZmF1bHQoKSwKc2luY2Ugd2UncmUgbm90IGV2ZW4gZ29p bmcgdG8gaW5zdGFsbCB0aGF0IHBhZ2UgaW50byB0aGUgZGVzdGluYXRpb24KYWRkcmVzcyBzcGFj ZSAoZmluaXNoX2ZhdWx0KCkgd2lsbCB1c2UgLT5jb3dfcGFnZSByYXRoZXIgdGhhbiAtPnBhZ2Up LAphbmQgY29weWluZyB0aGUgc291cmNlIHBhZ2UgZG9lcyBub3QgbmVlZCB0aGUgc291cmNlIHRv IGJlIGxvY2tlZC4KClNvIGluc3RlYWQgb2YgZG9pbmcgImxvY2sgaWYgaXQgd2Fzbid0IGxvY2tl ZCIgZm9sbG93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