Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5078629imm; Mon, 14 May 2018 19:12:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrwJRhQ3XE2HB0ICPvgaYt3n2kYsZh828WdisAbg1WoFxdd/t8XpGBBCRL8c4Dm59wExXGY X-Received: by 2002:a62:aa18:: with SMTP id e24-v6mr12800208pff.107.1526350358900; Mon, 14 May 2018 19:12:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526350358; cv=none; d=google.com; s=arc-20160816; b=ChwZAb3eUTfzTT75+Ll540njm8/qklUDrQ7PNs7bWVh/jTRLLe+VG8Ozy6NKYnpTyn udMswGxs7ayOEvO5EeoLe4G5Iql+xgZlTy/ldegpoMjKJaRwBtDKVPY4YqiDcztrLNZp aVhxVorXUYLi6duNVZxoEGugJU14MJA00i33ePsmzkIj1ARJCXk1tXRdjG/KRtV4cw9e oYQgwwH6Lz2tfx370a8ad/vMMoKyCYDzRBtwwlKshcvMiNgNSwUyEV0a7Or8pM4vGs1x 6alV9hoGNjKzSnsAB4VIg+NNawbU2cEOmagjWnEuHGCMRuCbBhwxfbDNsduO7SeGKsgK SYiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=PG1ZCNVAcVrQBZV/Htmwr1Cbj4G5+YojHWo9ncGfkXs=; b=R9EGcqiTdD5YO0dRY/2LSP1j2/NfSmeyTbWXQJH0HYbL69MyUqCk4L/mkkwwwzDeTn h+FIbXvMi7SGyAFbUfNfK3jREhl9sXBvJyjYQGhCwFTa/MQCHFSFw8a41kKs7EOL24Fu 5g2KeUzrZD1ci2DhtWIW5UHo4NnB7MK69kEfEkmhcyLy/3Ki1LgEx24gmRtPd2pRnEWx zPkEO2e6gwXnz01mLak52gJJqyG5TO0ALSYTnCgTj/zL3vav33qWcPEj8cxhLjOAgkMF JXGOUhqFyJFh3UpWwQnzZCglQITAhFoGmr02umGvUwZlKg2iXm2W03T/tKoxr3VajAzU RMpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=ibuZXXeX; 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 36-v6si11193724plb.140.2018.05.14.19.12.22; Mon, 14 May 2018 19:12:38 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=ibuZXXeX; 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 S1752357AbeEOCMP (ORCPT + 99 others); Mon, 14 May 2018 22:12:15 -0400 Received: from casper.infradead.org ([85.118.1.10]:36978 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752165AbeEOCMO (ORCPT ); Mon, 14 May 2018 22:12:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Message-ID:In-Reply-To:Subject:cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PG1ZCNVAcVrQBZV/Htmwr1Cbj4G5+YojHWo9ncGfkXs=; b=ibuZXXeXLwA19u5MjSd9Bqcvv VJwCV1KGkNXZSDgYkpZo1Z3iXT7N/ex0kW+QwOuHaAOeGByX9XxVM7RlQ1CozGciz7kuqNwovB8I1 jB3Hxn+/hxNosZzPL/CWMXFWhIGGVgsH5SenN7VmaZ5lDhjOgpXd7wwTcYsHbYUUEMnNprrhRbKZ4 Tm2M0rLjplrWccy5ZPNTfECqPYXi7WUKAAlIxEGFVpjc9RLHR51hDQoahRKtNER/3zGkzNwZ0/23A zIiIcKzGC7qws/qgi9JFG3EQqStXSC+/POZZ0puQo4KW2YzsUgrNWWVCCE0MTbIJ2RoavqjgAHrWT K2B6znDLA==; Received: from jsimmons (helo=localhost) by casper.infradead.org with local-esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIPRM-0004iS-Oo; Tue, 15 May 2018 02:11:56 +0000 Date: Tue, 15 May 2018 03:11:48 +0100 (BST) From: James Simmons To: NeilBrown 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: <87efid7l6z.fsf@notabene.neil.brown.name> Message-ID: 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> <87efid7l6z.fsf@notabene.neil.brown.name> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180515_031155_033221_CFC0889D X-CRM114-Status: GOOD ( 31.25 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > >> On Wed, May 02 2018, James Simmons wrote: > >> > >> > 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. > >> > >> 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 > > 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). > >> > >> 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. > >> > > ?? > > Am I misunderstanding something, or is that comment wrong? I think the comment is wrong. That comment was in the other tree before the patch was landed. It got included with this push due to me diffing the tree by accident. I will remove it with the next push.