Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6908195ybp; Wed, 16 Oct 2019 00:25:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwn946CGzXqjrIEPHsO91RvfJDRELN8FC2zztD2fW0FQvnziJjKiBtYNgny7xIs0TMTccf6 X-Received: by 2002:a17:906:f42:: with SMTP id h2mr38202681ejj.39.1571210754768; Wed, 16 Oct 2019 00:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571210754; cv=none; d=google.com; s=arc-20160816; b=mqnmwo72hUy+LdRJ0gN/sScz4AYh/bBRoVRpDSqMnQl7QImAn9WcgkXnvQSd4vW1WF Z5G5WDMrH4pnfpJD4NFf3AVD3ZSliWybzR+Bj8UBpm+bNcrFVd9kA6vSp/iq9evfBFIY 8HLS7vDKQPls9xzKImT32IakcRPsOOMihBb88pUaCDao21w8LvoDjCpZzn5r4gx0/9DA KPjOP/6MiBcCuqCpX1vdEmPig+VawYdhyCKO980vMEdgBT4oNR3hbsMsoQv3m4WJg+38 xnStcQ74T0jgmsJzGrxSbgAQn6D/6fg8DyDRGKmcT3vVxc5Ck9Sd6E3HTIox002prMds h9HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=d/Zz9M4vXV5ymfLbgnz4oj5mAYZiyyFZ4Ij6h9abXFA=; b=0FUZfv5s6CrloZ6STbWFBDovcz1glpDbO/2STynyFHALUqtBHfIXa50CwjXf+173OB IeW2FQcAk/7k92e75NSkGiFsER3DjmvO1715wu8PGceuWJveIkQjSUsXM2Pt0mSEAU0U ATG1GSI4w3GZ/fCgDiW6zv2f/lrR7y2fAHTTxi91Ns6VNjJxhNFGh2nUrAoQ3SvOanpc NVttigtG1LDdYhDTPidt08dXXaR7ttBUGRgFvYe2WexiUVAD2StDz74jQOCceuArjk7F eZR4pfd3CwqM+2uV+MynJ+8+lX64jXgJacDL3cQ3YIdKk7O+L1cubfCR9YU5kA7xMoJI aJDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="AlIXJO/Z"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g29si16451648edb.13.2019.10.16.00.25.31; Wed, 16 Oct 2019 00:25:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="AlIXJO/Z"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389230AbfJOWOc (ORCPT + 99 others); Tue, 15 Oct 2019 18:14:32 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44655 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbfJOWOc (ORCPT ); Tue, 15 Oct 2019 18:14:32 -0400 Received: by mail-lf1-f67.google.com with SMTP id q12so15690242lfc.11 for ; Tue, 15 Oct 2019 15:14:30 -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=d/Zz9M4vXV5ymfLbgnz4oj5mAYZiyyFZ4Ij6h9abXFA=; b=AlIXJO/ZLBv/p7d/ORSQnj90qcyxXZ/L4tcwMN1ksd4hi9eaymWS714WViotqQRLhk vIRHrilEHfQt3hkm1+JjO4o2Ud7MKCdkuXafJuo44Fo4GYyzQ/9AmESct2Xx7IfOK7Ok haqnjvvfI/PnFSGBeuzLe9ZId2U0u1ulJkPj0= 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=d/Zz9M4vXV5ymfLbgnz4oj5mAYZiyyFZ4Ij6h9abXFA=; b=I61GokqHtd621DY4709HB74Sp1AYpwUEaN72cHc5vYGp1wOY5D4HO2jgSqr+2mXE/G lacSXA6iTK942UsUihl9Jol3Nv0BVqZwhd1JsQg0BUEKKIte7CMbcl72FTifF5UzwnmG Hlq0LLH9CoXWt99Ad5+CSCkCtxTiW5xRDoaYuDVO61OkkTt9Pke8BNnS1c0fWrQ7+fVm noH/DoNdRsEwnUlYzukmbP5LX7zTWU/vXTwHiFCjwyqho37tlC4Pjg2rNTaxl4012Mnv 6Xrt8nj6Ph5FpYMybRTVhi+8eiWOXZImQKfqMpMxjCdKR5CWBAhnrUtN8O+epvihIL/b 8VkA== X-Gm-Message-State: APjAAAUR9qZTwQC+Aip0VTMfahmtvu1W7bTiDG2XrSoy2RnqDagEssRo 4RS8Jcq05sdzNygG0ndwVvn8b4YM8YM= X-Received: by 2002:a19:4a02:: with SMTP id x2mr20630643lfa.17.1571177669844; Tue, 15 Oct 2019 15:14:29 -0700 (PDT) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id h5sm5707221ljf.83.2019.10.15.15.14.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Oct 2019 15:14:28 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id f5so21879208ljg.8 for ; Tue, 15 Oct 2019 15:14:27 -0700 (PDT) X-Received: by 2002:a2e:6a04:: with SMTP id f4mr23595993ljc.97.1571177667184; Tue, 15 Oct 2019 15:14:27 -0700 (PDT) MIME-Version: 1.0 References: <157117606853.15019.15459271147790470307.stgit@warthog.procyon.org.uk> <157117608708.15019.1998141309054662114.stgit@warthog.procyon.org.uk> In-Reply-To: <157117608708.15019.1998141309054662114.stgit@warthog.procyon.org.uk> From: Linus Torvalds Date: Tue, 15 Oct 2019 15:14:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 02/21] Add a prelocked wake-up To: David Howells , Tim Chen , Kan Liang Cc: Casey Schaufler , Stephen Smalley , Greg Kroah-Hartman , Nicolas Dichtel , raven@themaw.net, Christian Brauner , keyrings@vger.kernel.org, linux-usb@vger.kernel.org, linux-block , LSM List , linux-fsdevel , Linux API , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 15, 2019 at 2:48 PM David Howells wrote: > > Add a wakeup call for a case whereby the caller already has the waitqueue > spinlock held. That naming is crazy. We already have helper functions like this, and they are just called "wake_up_locked()". So the "prelocked" naming is just odd. Make it be wake_up_interruptible_sync_poll_locked(). The helper function should likely be void __wake_up_locked_sync_key(struct wait_queue_head *wq_head, unsigned int mode, void *key) { __wake_up_common(wq_head, mode, 1, WF_SYNC, key, NULL); } EXPORT_SYMBOL_GPL(__wake_up_locked_sync_key); to match the other naming patterns there. [ Unrelated ] Looking at that mess of functions, I also wonder if we should try to just remove the bookmark code again. It was cute, and it was useful, but I think the problem with the page lock list may have been fixed by commit 9a1ea439b16b ("mm: put_and_wait_on_page_locked() while page is migrated") which avoids the retry condition with migrate_page_move_mapping(). Tim/Kan? Do you have the problematic load still? Linus