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=-5.6 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,USER_AGENT_SANE_1 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 59A3AC433E0 for ; Sat, 25 Jul 2020 19:28:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0FDB920674 for ; Sat, 25 Jul 2020 19:28:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fSRSh96a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FDB920674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 92FA86B0003; Sat, 25 Jul 2020 15:28:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8DFA16B0005; Sat, 25 Jul 2020 15:28:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7CFCE6B0006; Sat, 25 Jul 2020 15:28:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 669E96B0003 for ; Sat, 25 Jul 2020 15:28:06 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E6B8C8248047 for ; Sat, 25 Jul 2020 19:28:05 +0000 (UTC) X-FDA: 77077583730.19.step26_550857d26f52 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id C04801AD8CA for ; Sat, 25 Jul 2020 19:28:05 +0000 (UTC) X-HE-Tag: step26_550857d26f52 X-Filterd-Recvd-Size: 3916 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Sat, 25 Jul 2020 19:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595705284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=E4b8xOE1a+SCo8hP5TdzZ/KYctFwKJKu7PER0hCduYU=; b=fSRSh96aIidvY8qclYZWuZqfT293vZAwl0mCbYukCRgUVY2j3Lep2cuWnqOvWCPEnI4RXv ZgvzDV+BrGZhBV3A/4JbH7pNGOw+2o6YUMy7A0HWuh3iTK7fXDw0+3gusth0yej0jFoQgM HJhOGJddTk8MK8UCGqceG3m2z6wCaDg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-340-OtXHO55vMHqSr1UcLHQKag-1; Sat, 25 Jul 2020 15:27:58 -0400 X-MC-Unique: OtXHO55vMHqSr1UcLHQKag-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2C47C185BDF9; Sat, 25 Jul 2020 19:27:57 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.192.14]) by smtp.corp.redhat.com (Postfix) with SMTP id 111741C4; Sat, 25 Jul 2020 19:27:54 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sat, 25 Jul 2020 21:27:56 +0200 (CEST) Date: Sat, 25 Jul 2020 21:27:53 +0200 From: Oleg Nesterov To: Linus Torvalds Cc: Hugh Dickins , Michal Hocko , Linux-MM , LKML , Andrew Morton , Tim Chen , Michal Hocko Subject: Re: [RFC PATCH] mm: silence soft lockups from unlock_page Message-ID: <20200725192753.GA21962@redhat.com> References: <20200723124749.GA7428@redhat.com> <20200724152424.GC17209@redhat.com> <20200725101445.GB3870@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Rspamd-Queue-Id: C04801AD8CA X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: Firstly, to avoid the confusion, let me repeat I think your patch is fine. I too thought that non-exclusive waiters do not care about the bit state and thus wake_page_function() can simply wake them all up. But then I did "git blame", found your commit 3510ca20ece0150 and came to conclusion there are reasons we should not do this. On 07/25, Linus Torvalds wrote: > > On Sat, Jul 25, 2020 at 3:14 AM Oleg Nesterov wrote: > > > > 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. Ah, sorry for confusion, this doesn't matter. I didn't mean "fairness". What I tried to say. AFAICS before that commit we had (almost) the same behaviour you propose now: unlock_page/etc wakes all the non-exclusive waiters up. No? Or I misunderstood your reply? Quite possibly, too late for me... Oleg.