Received: by 10.192.165.148 with SMTP id m20csp2866767imm; Mon, 7 May 2018 02:30:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoTpc26SoYTLT/7RWtnaSw9mOUgwbABxnEjs7oFUjDbw5cE6YtOL3pYYvhWL9Xo2tVLpGah X-Received: by 10.98.69.137 with SMTP id n9mr34981075pfi.158.1525685419474; Mon, 07 May 2018 02:30:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525685419; cv=none; d=google.com; s=arc-20160816; b=gPhwrsOREKgSdsfNO70xbpmue5lsmP/FUypudIZ4u5x9omchIHrb2P5rEadALf9wUp LeX6AvRHMtlfcZAV3u3k4+Eqnqnv7aarj1nNB0FXPfvbD8KVNsJJrBCuiQft/7oXyPYJ g9UH76guX+FMaGH+qqZXyvRE2Y/dfGzZMdz8l/5J8Pue0V3SVuEDWeWyb7q1u6t4qF0+ kJqN8ev5NYhcBz/1XD54iyDq2LX+CEuiBNW9mMMRW+RmEkTWOhjajobO+kAJEbQTb7qp E0hM2YY/IAeLgP/5kGkW0Uk67OW4H0h/x4gMx+Ecp7iNDUJew2kY1Dt0d3HJpiqybsK4 Mg4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=JyNn7XIVqSN605z4k13TTz7vtsmWe7Zb5vPDb/0JsP4=; b=BHa8pYEEIP3xwXxnXAu1HRHmdTFbIqboa7RZmYXxSb/hVPf5qhx2Qjxiqf/c0ZJgMt cFbCz/q/9gZ+Ekke2xNjE1qDy9erVa8gc21zwhd8YMCa3kfOcICnuwEegge/E/cvNYZ3 2AOwz9YFonUyv5QUKDhBNckI+vLwkgzxbUv5zteaa+Ae7E2nB/ElecU3tfuqCpSgzXRm kuoaOM3iCbJwijjVMqhepoYzHSkwgJeRZlpamMtsOJw+i5YIgjHtQxk4GaCchkHYkLIE SYMyNwimjZb84DQJwfGF5C4x06Y/0UM+/p4ySHCFO6sHaub9V1Udf8O9j7hocPyQXZ7g 0FMQ== 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 f1si20195899pfn.269.2018.05.07.02.30.05; Mon, 07 May 2018 02:30:19 -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 S1752190AbeEGJ3u (ORCPT + 99 others); Mon, 7 May 2018 05:29:50 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:50140 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752010AbeEGJ3n (ORCPT ); Mon, 7 May 2018 05:29:43 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1fFcSi-00089a-1c; Mon, 07 May 2018 17:29:40 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1fFcSh-0007Ok-HD; Mon, 07 May 2018 17:29:39 +0800 Date: Mon, 7 May 2018 17:29:39 +0800 From: Herbert Xu To: NeilBrown Cc: Thomas Graf , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 8/8] rhashtable: don't hold lock on first table throughout insertion. Message-ID: <20180507092939.vhps3uf2vdckf7ky@gondor.apana.org.au> References: <152540595840.18473.11298241115621799037.stgit@noble> <152540605444.18473.9591316658457316578.stgit@noble> <20180505094117.pl7b6bbk6mtyri6d@gondor.apana.org.au> <87sh75dapa.fsf@notabene.neil.brown.name> <20180506052000.7yehd5lke3smccoj@gondor.apana.org.au> <878t8wcthy.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878t8wcthy.fsf@notabene.neil.brown.name> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 07, 2018 at 08:24:41AM +1000, NeilBrown wrote: > > This is true, but I don't see how it is relevant. > At some point, each thread will find that the table they have just > locked for their search key, has a NULL 'future_tbl' pointer. > At the point, the thread can know that the key is not in any table, > and that no other thread can add the key until the lock is released. The updating of future_tbl is not synchronised with insert threads. Therefore it is entirely possible that two inserters end up on different tables as their "latest" table. This must not be allowed to occur. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt