Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp3125727ybh; Sat, 25 Jul 2020 11:50:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWgD+d5T/BVPhUA6BiNs+FamcqhxDK1KUKBjsnMbTjaC4nE2vLUsLBWaHU77u77HMRVLCd X-Received: by 2002:aa7:ca05:: with SMTP id y5mr14706516eds.204.1595703028342; Sat, 25 Jul 2020 11:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595703028; cv=none; d=google.com; s=arc-20160816; b=xy0IGjfQmo5/QjDJQiobsm3YGjjSKcLqOawJtwLV7PY6c+WXCdmjWEwshxB7EV7i3D bQKi6oDgQDigtqlfJD7r01StWmMz3WZ6av0LskvD4ta0RwWjvMYT4KQ2RfuQp25a8fcJ WGXbLYSbSxnDVpJG5Vjlr/gnMZKKxfSib1PXtC/R1cM5U2BwE6Z1eFHAlbNcTVrw6e9l CVg/m1GjmzgyKQA1rUfj+d8Ih/L6+aPWebs4dy7Iz9WFO1d7KEt/x/RSBiy9Wy3nzvwA O1lj63DynAqY1SAL37AIO8BcZ9Scwm/subTo14tM9UksvmeYwPEHEJ/whR3sGPLUsHSi iHNw== 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=uhV82Ck0bx4IRzuHTa923nInRUJDUpSkjAmZsyGi/28=; b=Y8lOfPRLcKFMVoNbvJiDGd7LOeYKLcnQ3sKF4UEryUATGGskjTFm0AOZ6aTpG+jNzt zbnznO1/tnlK3SCpmGCI6bO1/xKFUNAg0+W4UtatcJnAUCCXIb0e5GUwjiafkIzgAkFn 8I0URLq6uho3aiB0vdRuGxT3adrUQzzElR6m33ndkzb3tp5c7x/gb+O6ctFk2msh5/8j 1TNs+aOWOUI0qm2SPx0TVTTGyhtjAiTADGkG0vFalZWAAmEXC+grKHrXRi573fuAjwzC g7IoqqMPSrLy644qgfoBoMsxI26H0OjXeqdbQrFa/MmjnoCuNcDWbClbPC8B00+m3q6s ZsSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FCzTzzUO; 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 bx17si2567049edb.559.2020.07.25.11.50.05; Sat, 25 Jul 2020 11:50:28 -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=FCzTzzUO; 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 S1727904AbgGYStC (ORCPT + 99 others); Sat, 25 Jul 2020 14:49:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbgGYStB (ORCPT ); Sat, 25 Jul 2020 14:49:01 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 954A1C08C5C0 for ; Sat, 25 Jul 2020 11:49:01 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id i80so6891036lfi.13 for ; Sat, 25 Jul 2020 11:49:01 -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=uhV82Ck0bx4IRzuHTa923nInRUJDUpSkjAmZsyGi/28=; b=FCzTzzUO9rdyNK8BUOPugYbX8pHQozqQlW7Ecn0OjkAgGqfLj/Coy/X2BTx5SH5knk +MMR+CWJRUV0zBDa9c80ewMvbe2qMmu/o7KRSlENLysMqA1GvXHs+1s0arsxysoAS9Dl Nws4jWhAWi19kHoajgY3XM48Cg5ZxCy/7KiJg= 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=uhV82Ck0bx4IRzuHTa923nInRUJDUpSkjAmZsyGi/28=; b=ni1Dt6zuqwuY6kFXwqGYwIgdaDUjesl8dFpGwNriQ/vEHm7ikIYk85aJnE+Qlwe39t sJxs6VWwOdKN6Tjx8DEblvFtI+FG2X35FhJrWlvgUWa0YRTc8X2BOVow35zoI2FCP0IX Ba8koA5j5gvODWYUFwefk2mmq8ppoQdhvmwcOtbW3uJ/kyCWeo+Yf9vgJ1DrlMizsNZe FhFELwgJiMSZTajbxNx+ceG3e0iBQYHMQrlnr91GiSv8vEwe1yc2eeXMU3uqpxn3JGbb QpIx42kgtdXqTEOQnN558OZjGhlVYgSpZ0/yO3TyZ/AeEJuXMsrfpAKBas77igt0gJax Ym8g== X-Gm-Message-State: AOAM533zU76Oxxp5MR1BIvVhcELH8Y69ebu8Adu7Hijx0mkcXNrsxV5y B8Kz6/NC0yhZS0IikqW4FEhNRGK7nj0= X-Received: by 2002:ac2:530e:: with SMTP id c14mr7902358lfh.127.1595702939368; Sat, 25 Jul 2020 11:48:59 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id a19sm1572480lff.25.2020.07.25.11.48.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Jul 2020 11:48:58 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id s9so6920563lfs.4 for ; Sat, 25 Jul 2020 11:48:57 -0700 (PDT) X-Received: by 2002:a19:c206:: with SMTP id l6mr7873933lfc.152.1595702937396; Sat, 25 Jul 2020 11:48:57 -0700 (PDT) MIME-Version: 1.0 References: <20200723124749.GA7428@redhat.com> <20200724152424.GC17209@redhat.com> <20200725101445.GB3870@redhat.com> In-Reply-To: <20200725101445.GB3870@redhat.com> From: Linus Torvalds Date: Sat, 25 Jul 2020 11:48:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] mm: silence soft lockups from unlock_page To: Oleg Nesterov Cc: Hugh Dickins , Michal Hocko , Linux-MM , LKML , Andrew Morton , Tim Chen , Michal Hocko 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 Sat, Jul 25, 2020 at 3:14 AM Oleg Nesterov wrote: > > Heh. I too thought about this. And just in case, your patch looks correct > to me. But I can't really comment this behavioural change. Perhaps it > should come in a separate patch? We could do that. At the same time, I think both parts change how the waitqueue works that it might as well just be one "fix page_bit_wait waitqueue usage". But let's wait to see what Hugh's numbers say. > In essense, this partly reverts your commit 3510ca20ece0150 > ("Minor page waitqueue cleanups"). I mean this part: Well, no. I mean, it keeps the "always add to the fail" behavior. But some of the reasons for it have gone away. Now we could just make it go back to always doing non-exclusive waits at the head. The non-exclusive waiters _used_ to re-insert themselves on the queue until they saw the bit clear, so waking them up if the bit was just going to be set again was just going to make for unnecessary scheduling and waitlist noise. That reason is gone. But I think the fundamental fairness issue might still be there. So I'll keep the simpler "always add at the end". But you're right - we could expedite the non-exclusive waiters even more. Linus