Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1085955ybh; Tue, 10 Mar 2020 14:22:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsVjgt41EH4NudXPdk7X6CKMyDLaheMXR3KrmIi3qAOUUOsqved5SiKApmA96BmLLzBH5px X-Received: by 2002:a54:440e:: with SMTP id k14mr2629407oiw.76.1583875356836; Tue, 10 Mar 2020 14:22:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583875356; cv=none; d=google.com; s=arc-20160816; b=xwlOkopCTABMkIKOJf1/wRsq4f9NuK2pURrt+KR+kQdZrh2WlvX/tW4MqlmpCzuO40 Ud34OofKQFgJIjDKbqBGU6WaIbOQBep8Xqhj+sKeIV+cmjGyOilh4Dl3mHC9DseoEYo0 RuObM+oyVY9STwzZeEepK4MO/rzFPrexz5UeD53cAMnDW2dXLgyBuuJBRY3MR9arFRcz hdrdDqFCngLlXmJvdZxA5ypIFm5e5nTM8LPy/Wkft/Ta+QDw55c7GwJg+bJLATHh2j+k PwjN6DE1UqBkWvUB1ESrUu9qmR+RTwKXsnaugfh2izCtLvTk2KcPb+JfgEKv5vO0lByy Q86Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:references :in-reply-to:subject:cc:date:to:from; bh=YYPnI3GTaoc3jzSZ1SgGbxwsoipH+LbkbhS5MgwwEwk=; b=Hbek8PX88XPqzaoA52eS1RNSC0LhQDPyjQekgMwSJjh4DfwfYdFkHhx+Y2QiZVaaXt zj1tzu/6FyNT1O8mL014xiUBXp4vi/z2A2lTLVYrnGBYvFsDR07q7f/9PRtWjkwr65rx 5VrzNUR4dm4H+6c15ciFKrxRPi5EQvJozZq2X+xtOkjooL602DWYk587rEVpMF2KwQXA 7jPgli7cHHgW2Dgkz5ZqEwcYX+VoYCg0e0zq3Owelh8yISOMkdjDD1Avi74n2AdZWLgI 3oYrkuxUEjlkzN0uFDS0GqyDOJLpcB71UOvevpAmdNY280HCnxlUKE9zRJTEXjBE/kq5 nvMg== ARC-Authentication-Results: i=1; mx.google.com; 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 d21si3483239otq.72.2020.03.10.14.22.24; Tue, 10 Mar 2020 14:22:36 -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; 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 S1727539AbgCJVWB (ORCPT + 99 others); Tue, 10 Mar 2020 17:22:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:56302 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbgCJVWA (ORCPT ); Tue, 10 Mar 2020 17:22:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9F294AFDF; Tue, 10 Mar 2020 21:21:58 +0000 (UTC) From: NeilBrown To: Jeff Layton , yangerkun , Linus Torvalds Date: Wed, 11 Mar 2020 08:21:49 +1100 Cc: kernel test robot , LKML , lkp@lists.01.org, Bruce Fields , Al Viro Subject: Re: [locks] 6d390e4b5d: will-it-scale.per_process_ops -96.6% regression In-Reply-To: References: <20200308140314.GQ5972@shao2-debian> <34355c4fe6c3968b1f619c60d5ff2ca11a313096.camel@kernel.org> <1bfba96b4bf0d3ca9a18a2bced3ef3a2a7b44dad.camel@kernel.org> <87blp5urwq.fsf@notabene.neil.brown.name> <41c83d34ae4c166f48e7969b2b71e43a0f69028d.camel@kernel.org> <923487db2c9396c79f8e8dd4f846b2b1762635c8.camel@kernel.org> <36c58a6d07b67aac751fca27a4938dc1759d9267.camel@kernel.org> <878sk7vs8q.fsf@notabene.neil.brown.name> Message-ID: <875zfbvrbm.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, Mar 10 2020, Jeff Layton wrote: >> @@ -735,11 +723,13 @@ static void __locks_wake_up_blocks(struct file_loc= k *blocker) >>=20=20 >> waiter =3D list_first_entry(&blocker->fl_blocked_requests, >> struct file_lock, fl_blocked_member); >> - __locks_delete_block(waiter); >> + locks_delete_global_blocked(waiter); >> + waiter->fl_blocker =3D NULL; >> if (waiter->fl_lmops && waiter->fl_lmops->lm_notify) >> waiter->fl_lmops->lm_notify(waiter); >> else >> wake_up(&waiter->fl_wait); >> + list_del_init(&waiter->fl_blocked_member); > > Are you sure you don't need a memory barrier here? Could the > list_del_init be hoisted just above the if condition? > A compiler barrier() is probably justified. Memory barriers delay reads and expedite writes so they cannot be needed. wake_up(&waiter->fl_wait); + /* The list_del_init() must not be visible before the + * wake_up completes, the the waiter can then be freed. + */ + barrier(); + list_del_init(&waiter->fl_blocked_member); Thanks, NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAl5oBO0ACgkQOeye3VZi gblwqQ/8DkoZJyjuip/ioeNV4RJRreBlvckVZvhMWegAEcWtiVd5cIxwwz8R4C/Q Wjqpyxw9g2jzlhbwNfjQwgQqVyWppGrzjhWlIDD5Js6nE8BKTBFtaWpcFsfZ6CX+ xieFoX0DIVAqqqJZPY2GaJZ11PUtJMHmr+/nDz2IdQNEcZuu34V1z+kTFzYyXevm 4lEy/8e5c16/lRID0fB4kk3RkcrM3DMnvONExpW2jqK0MrDMoTkxbLhhtMKONj0j qDYCe7sV7+h9dxGA5WFWxvbt6l4n6epnNa5pKqihLtFqi85jGTygbca3V8W8YDM6 inrX9L+EduuK0VBP21sWc0k1YZTF3xCt+uVTLM/qROevkxivD6vWCB2XdAqNbnoj raxEz15GEoMqAUlaPQ73hpvMfeAaeXVEm9gsgp7LjzoyQzL7F6rk5xQ/ccRo4cK2 zEoGnAt9kXQpobSfjnOELoFbzEFshSxzwQuEzmeh8fe7z84qjMVBl2kJOcL2XJ0N dv2jiyG46DPl1ALm9EAVv4qlcwmOe4vklq087STWgGbAJTlzj+Q6SayXyOAwdzK+ RRxyvjEcPfS0xivpE2l0FkU/zjcg+A1HkSG94KPEP4xjLalfevU68H3BoSCfuGr2 PueecWCIamfD9nVunUqyawXWxdPISUKNrgq1sqQ2J8exnpUqMIU= =ZHtk -----END PGP SIGNATURE----- --=-=-=--