Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5050622imm; Mon, 14 May 2018 18:38:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZohMlSZK5vo563taVq9EOv7F7FaWi81dNlN78EZ6FZT34Vrv3znvF+eCA9Tu4XcMJ/MkGLA X-Received: by 2002:a17:902:aa94:: with SMTP id d20-v6mr12578469plr.323.1526348315593; Mon, 14 May 2018 18:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526348315; cv=none; d=google.com; s=arc-20160816; b=r0JHRMp5XnK/B9N/rUQuC4TnhmM6RDQ90+p+IyXxwfU0DSKTL25XoeFTf0Ou3+PZhi 7nsjGtqJywFdXLNjIwfOBgTalgm6AnvvJAL0pvklKySgVwREFn7kSHsdAzUPM4BcmRDy 11gzVoWAeEv8QILD6+K0eTfvUcvs3qN/K/njNLF11Ue1R9CVJoK+B3cRqLPl7OGIytME cgVFuoc6QokGTCdC4F0qy5Pxgh9U6XV8ct4UWuev93Z3o/gcrLKK0Ie/3M8VvLua1Yho BxYBt3VW2dN5V4OEh6ne88uMTfz4lbL08Qb4engultI+GTmPbIy5OBqQMI76iHPZJQ4I euiQ== 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:arc-authentication-results; bh=OpS/CcnQj4J72zAv4D4mIdbY5yTzFKHupBVPvdtotDQ=; b=JlfrGFGyT+9IXu0YBXpXeb7bQLCEoT4w6Q2t748CFOeaBmMKHAuUOMEtSqG1Dsek+X rlsnMzn7O9AJ9QQnKbSXrMMpIRVr3ohN9l5+CxsTzY3eKV+u7iJaYRFPV1tBEbhA10fg PeBofJHBV4c8T4+xhKoKz4p/vCXlVwmc0t3VXCfybE4buPhiQK6IwJxrVebAgGYk29Ii pWbbO2zVAAiQ0qQbLTZVw0RFF3WsEgjo/iinQVh20kFNp+vHwgMNoV66oYMBTkDU7sOX VNS9n/ESUX7X2F9s9qYL67CG7G33YpWIdO8HH1Syb9igPwS4lXyMyCW0ZVKPXGjJ2rBz FTQQ== 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 81-v6si10655234pfl.295.2018.05.14.18.38.21; Mon, 14 May 2018 18:38:35 -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 S1752170AbeEOBiK (ORCPT + 99 others); Mon, 14 May 2018 21:38:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:49099 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbeEOBiJ (ORCPT ); Mon, 14 May 2018 21:38:09 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EB6F9ABD9; Tue, 15 May 2018 01:38:07 +0000 (UTC) From: NeilBrown To: James Simmons Date: Tue, 15 May 2018 11:37:56 +1000 Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin , Lai Siyao , Jinshan Xiong , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 4/4] staging: lustre: obdclass: change object lookup to no wait mode In-Reply-To: References: <1525285308-15347-1-git-send-email-jsimmons@infradead.org> <1525285308-15347-5-git-send-email-jsimmons@infradead.org> <876044fcgg.fsf@notabene.neil.brown.name> Message-ID: <87efid7l6z.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, May 15 2018, James Simmons wrote: >> On Wed, May 02 2018, James Simmons wrote: >>=20 >> > From: Lai Siyao >> > >> > Currently we set LU_OBJECT_HEARD_BANSHEE on object when we want >> > to remove object from cache, but this may lead to deadlock, because >> > when other process lookup such object, it needs to wait for this >> > object until release (done at last refcount put), while that process >> > maybe already hold an LDLM lock. >> > >> > Now that current code can handle dying object correctly, we can just >> > return such object in lookup, thus the above deadlock can be avoided. >>=20 >> I think one of the reasons that I didn't apply this to mainline myself >> is that "Now that" comment. When is the "now" that it is referring to? >> Are were sure that all code in mainline "can handle dying objects >> correctly"?? > > So I talked to Lai and he posted the LU-9049 ticket what patches need to > land before this one. Only one patch is of concern and its for LU-9203 > which doesn't apply to the staging tree since we don't have the LNet SMP > updates in our tree. I saved notes about making sure LU-9203 lands=20 > together with the future LNet SMP changes. As it stands it is safe to > land to staging. Thanks a lot for looking into this. Nice to have the safety of this change confirmed. What do you think of: >> > @@ -713,36 +691,46 @@ struct lu_object *lu_object_find_at(const struct= lu_env *env, >> > * It is unnecessary to perform lookup-alloc-lookup-insert, instead, >> > * just alloc and insert directly. >> > * >> > + * If dying object is found during index search, add @waiter to the >> > + * site wait-queue and return ERR_PTR(-EAGAIN). >>=20 >> It seems odd to add this comment here, when it seems to describe code >> that is being removed. >> I can see that this comment is added by the upstream patch >> Commit: fa14bdf6b648 ("LU-9049 obdclass: change object lookup to no wait= mode") >> but I cannot see what it refers to. >>=20 ?? Am I misunderstanding something, or is that comment wrong? Thanks, NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlr6OfQACgkQOeye3VZi gbl7RA//VDzBj1UncUhWv/9vthIv2Vm46k/h5SN4iAmnnIaVRNVWcKkGyoCj62hQ e1Q1fJ83Xbe2xkEWiuYhjoKd8fJWsG1eaxxlNI6HWEEv1BxbmHyhjYIQ3RbaIapA wf9GIU2q21CMUvLsGlrLb+yN9Upa10Vyb9LNKqenLq9C9yxKBHy12F7d0XYYUQ6H js8IjlUWsWO8NgOKzb4WnDbHW3iKIpHISpxaLHvkmA8oLm8dkC6NqLyLkDa1n3Fz lyZrxeMyx/caZf4ePeyendU4zBnnIuKbTU4GhnAyPaYVfRfrXxqI0JZqje5XxM/y J+rZ/5Uxhgg7rH+q3Y5+Xeadn9MhbZRxbGWJn//S6IA8Y1lEjRbrU/VbTQrBu2kN E3xuYtX71oaJOf9iwnBl5oCs81LT7qVNYBUV4cbawJ9EPVVKVpDx5G6jBWH0utyk 5/eGdTCKpjrxf+f25zXfS47KQL/7tPwuCHyJSocHrnE7DMwE/FEgbDu/KTjIP0zG wUROiDsA/x1oKlKBMTwBnLPqmxL2CSkCZq5ptsf+iuUZqBboE6dPX4Yqt8K5YFJc h52wPp50BrFaMs6lsmhPdO7wYBFIAQtvVVFvA8Puyc/8sTma9PZoWW/NrJu3n9RJ AVSnSD75SWaVrnfrR+tZKYF31rjG0qJAhx3FJjV5MY/k1N+fqK0= =8ybm -----END PGP SIGNATURE----- --=-=-=--