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=-4.1 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 1503CC433E0 for ; Thu, 6 Aug 2020 18:33:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6195D221E3 for ; Thu, 6 Aug 2020 18:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596738793; bh=iMAoRSaPg2/2OW1EnF3rmdcuA0+TdqdW5SyOOQmPC4w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=m0ZoCPwBmvpH4+W/nfHZgIuFKlPiC9+iYEpr7rzLQ3MyrLicS68bpuIKslioSJeSp 4BOYyGohfVkQAOabVgOaHwgOSgcbJYDlvufAK4oG0SjjuOLYJ/bH62BjgruG78D8G+ NCdWiUI4Q28VSOnsnGLLSW1+uqqk6peOaCuwPRmQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728912AbgHFSdL (ORCPT ); Thu, 6 Aug 2020 14:33:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728681AbgHFScs (ORCPT ); Thu, 6 Aug 2020 14:32:48 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D6B6C0617A2 for ; Thu, 6 Aug 2020 11:32:41 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id 185so42646789ljj.7 for ; Thu, 06 Aug 2020 11:32:41 -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=5Af00Sko3u8Ezl+gPJCbV7BmjNT3BmtEBTcrFloNwnA=; b=DFus0hPOttxaAQsjZku/lbVZ4VYNVh5ObQRgCsovPMIpe9B7M1GF6NUUDJo1jk/pkb I6Ji2PfXuoBnNs+NvpieyLlb1LZOse1mfbKXBwiVzCeSr6cpb9kz8NcJyk68AaXmSWxz erFbvQZqcdnoPk8TTEHA+WcvMXssy1YK2pPYc= 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=5Af00Sko3u8Ezl+gPJCbV7BmjNT3BmtEBTcrFloNwnA=; b=V9nDnovvq3pPD0S/1dETo67ZZ+AuDr9RBYGOnB/3omKG4/Ia1dBiypbL0lXDDvIdyg 6ENTS9eUL0akaB8jcWLtAnNi4vxL+N7FLDYBn9ldTCQ0cFQzA036q9IEEwMv/3Ce2gHx 4F4zG26Ka08l8DzwzSbX8RwLcS9s2REpdpdRmKi14lWeQoJaN9MQ8mwSxhzdTzTVIu83 i1GzcQvgLB+lhc5TmO5+xKCT2NSVpF7bXqtL+n9iX1MnvOZXG7RMgFjnWKlxr9agjFRa MRVpLx836Z5uR93KuZ8xfaKgsmPQ/aXdCKy8kCrzknCnlEQXa986HnKrQRNuj7eyYpp8 LjjA== X-Gm-Message-State: AOAM530uA4n9tn2fyF2o9dQorBOTRT/NJyZnaH61HQeMI/jnSeQi2rD7 ZLz2+npl7rPbldHg8wufb+4iCPY3/kE= X-Google-Smtp-Source: ABdhPJx6JFEVPmgX9Qhq3UHZ6yUB9Ss7WyTVFzSa07Yop5c5x9UIQcQF15POjgDY7r98mrpATPHWFw== X-Received: by 2002:a2e:910b:: with SMTP id m11mr4448850ljg.159.1596738758810; Thu, 06 Aug 2020 11:32:38 -0700 (PDT) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id 203sm3067881lfk.49.2020.08.06.11.32.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Aug 2020 11:32:37 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id w14so23059812ljj.4 for ; Thu, 06 Aug 2020 11:32:36 -0700 (PDT) X-Received: by 2002:a2e:b008:: with SMTP id y8mr3902152ljk.421.1596738756512; Thu, 06 Aug 2020 11:32:36 -0700 (PDT) MIME-Version: 1.0 References: <20200724152424.GC17209@redhat.com> <20200725101445.GB3870@redhat.com> <20200806180024.GB17456@casper.infradead.org> In-Reply-To: <20200806180024.GB17456@casper.infradead.org> From: Linus Torvalds Date: Thu, 6 Aug 2020 11:32:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] mm: silence soft lockups from unlock_page To: Matthew Wilcox Cc: Hugh Dickins , Oleg Nesterov , Michal Hocko , Linux-MM , LKML , Andrew Morton , Tim Chen , Michal Hocko , Greg KH 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 Thu, Aug 6, 2020 at 11:00 AM Matthew Wilcox wrote: > > It wasn't clear to me whether Hugh thought it was an improvement or > not that trylock was now less likely to jump the queue. There're > the usual "fair is the opposite of throughput" kind of arguments. Yeah, it could go either way. But on the whole, if the lock bit is getting any contention, I think we'd rather have it be fair for latency reasons. That said, I'm not convinced about my patch, and I actually threw it away without even testing it (sometimes I keep patches around in my private tree for testing, and they can live there for months or even years when I wonder if they are worth it, but this time I didn't bother to go to the trouble). If somebody is interested in pursuing this, I think that patch might be a good starting point (and it _might_ even work), but it seemed to be too subtle to really worry about unless somebody finds an actual acute reason for it. I think the existing patch narrowing the window is good, and it clearly didn't hurt throughput (although that was almost certainly for other reasons). Linus 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=-4.1 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,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 E621BC433DF for ; Thu, 6 Aug 2020 18:32:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 07E9B221E3 for ; Thu, 6 Aug 2020 18:32:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="DFus0hPO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07E9B221E3 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 CA5CC6B0002; Thu, 6 Aug 2020 14:32:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C2DBE6B0003; Thu, 6 Aug 2020 14:32:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF5AE6B0005; Thu, 6 Aug 2020 14:32:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id 973A56B0002 for ; Thu, 6 Aug 2020 14:32:42 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 4E2153628 for ; Thu, 6 Aug 2020 18:32:42 +0000 (UTC) X-FDA: 77120989764.08.kite45_170aa7426fb9 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 244C81819E769 for ; Thu, 6 Aug 2020 18:32:42 +0000 (UTC) X-HE-Tag: kite45_170aa7426fb9 X-Filterd-Recvd-Size: 5066 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Thu, 6 Aug 2020 18:32:41 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id b11so26642708lfe.10 for ; Thu, 06 Aug 2020 11:32:41 -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=5Af00Sko3u8Ezl+gPJCbV7BmjNT3BmtEBTcrFloNwnA=; b=DFus0hPOttxaAQsjZku/lbVZ4VYNVh5ObQRgCsovPMIpe9B7M1GF6NUUDJo1jk/pkb I6Ji2PfXuoBnNs+NvpieyLlb1LZOse1mfbKXBwiVzCeSr6cpb9kz8NcJyk68AaXmSWxz erFbvQZqcdnoPk8TTEHA+WcvMXssy1YK2pPYc= 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=5Af00Sko3u8Ezl+gPJCbV7BmjNT3BmtEBTcrFloNwnA=; b=tH8LowaWtikNKRrCZWKDONiHD580Y3qo2eOvodNvKamAnwq1rHcTOIvqGv+BxXL0Xk vsFKes0ynPf7nji7BF+IivasDRJVMKmGLqatwlzbFmzvrb7MerWQgV60TPXsl1IhSIQG 9SLV6J32quJ/RB45IOhhNqtJsD7v/8/b6JDyCj3JdnTxHgMOrA5XyrRWO5e7ZQqJDMdK z6AhWHlImyS0STQDM+WH+3Fg6RUIE+E4RKSaHfq0+S2Y5BLlQSvoSAbwBAo2uy9a+jM3 ELQp0WEjcnW2+k8/ejnos6TDOxhp8gza5eViPf1vU9/6wf/F81dypLD5GKGUnCuKnV4M vJ9Q== X-Gm-Message-State: AOAM530SH6/FgQPbEAJIseu3sGONRWj4pdRllBBeI+f+d/L7991W29TN AWiEzLdnd2+7UYrT1kMaPPr8DawpJ1I= X-Google-Smtp-Source: ABdhPJyRwli2CBbp/BBG8fYxhwen702pEg92vBO1x0gLyGwrNXRrdk7C/3R/tyBcQaQWwQBn+wPB9Q== X-Received: by 2002:a19:c501:: with SMTP id w1mr4192093lfe.172.1596738759420; Thu, 06 Aug 2020 11:32:39 -0700 (PDT) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id s1sm3107579lfi.76.2020.08.06.11.32.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Aug 2020 11:32:37 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id z14so15303546ljm.1 for ; Thu, 06 Aug 2020 11:32:36 -0700 (PDT) X-Received: by 2002:a2e:b008:: with SMTP id y8mr3902152ljk.421.1596738756512; Thu, 06 Aug 2020 11:32:36 -0700 (PDT) MIME-Version: 1.0 References: <20200724152424.GC17209@redhat.com> <20200725101445.GB3870@redhat.com> <20200806180024.GB17456@casper.infradead.org> In-Reply-To: <20200806180024.GB17456@casper.infradead.org> From: Linus Torvalds Date: Thu, 6 Aug 2020 11:32:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] mm: silence soft lockups from unlock_page To: Matthew Wilcox Cc: Hugh Dickins , Oleg Nesterov , Michal Hocko , Linux-MM , LKML , Andrew Morton , Tim Chen , Michal Hocko , Greg KH Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 244C81819E769 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 Thu, Aug 6, 2020 at 11:00 AM Matthew Wilcox wrote: > > It wasn't clear to me whether Hugh thought it was an improvement or > not that trylock was now less likely to jump the queue. There're > the usual "fair is the opposite of throughput" kind of arguments. Yeah, it could go either way. But on the whole, if the lock bit is getting any contention, I think we'd rather have it be fair for latency reasons. That said, I'm not convinced about my patch, and I actually threw it away without even testing it (sometimes I keep patches around in my private tree for testing, and they can live there for months or even years when I wonder if they are worth it, but this time I didn't bother to go to the trouble). If somebody is interested in pursuing this, I think that patch might be a good starting point (and it _might_ even work), but it seemed to be too subtle to really worry about unless somebody finds an actual acute reason for it. I think the existing patch narrowing the window is good, and it clearly didn't hurt throughput (although that was almost certainly for other reasons). Linus