Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2452146yba; Sun, 7 Apr 2019 19:35:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwR9tqLnwlDgyjrVg3o8kJYZRdzl4qudCGxeqMxETYpJnwhkD90HZvGy6itW1GXaekxbwj5 X-Received: by 2002:a17:902:9884:: with SMTP id s4mr27680457plp.179.1554690925329; Sun, 07 Apr 2019 19:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554690925; cv=none; d=google.com; s=arc-20160816; b=pSnzW5enZ/c1Zp62eLkMju3W8WsitIszQZIEhEByrWWVuxgLWRn61tXRUMf+qo3joC xWLQvtxMvNvAldam3VuYuJ/A53ScFDM0Mf89YB/vXSokgFKY4lxY5xxtHRTJeAgVtU6Y AigQd49/mYEF0qe/KRvGNDr377E9/jOMG08eNFb8UWY6InDMgj6EqQBkGMAv0O2sy8UV blHLOvJUsOD5PhrhshnSf7u6jdHVMlhG3IdRZ6Dd5X44nshps7O6OWz3oJ3W/Fvr60h5 td6BLW1hXlIYsY5xmSgHCFkdi9Lo7al4xCbIUyaw89BR7U6yzZduqoizg0t8XdZEMqNi 0BEQ== 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; bh=j+5SpWlfHDa26Opdr0/78EK3rTc0xfvvwVZQyxndgcY=; b=LXJhm/kSo3w5pbEA/SWCAHgsCTWO4FmQaNsku8AjVEldWv/ufD3J5tLJzNnoVYgRse hakqdDyIizNbe9Nk4nBSTTfv7BAYKOQfzisFq4qJi2sv6yzDRnw3zM4EokuobGrZdPl8 VWadopNbyt4tmkwUl7G1Ii3QJwPTj361sShWESR8lk8NKk8TQV/wwiAaVDO8HQrnQEmA K5qrVVimvxzbzy3YMbbN/NldxuoNkYw3C/t3MRPEugskMOQmaaVT7meITkN79MwYUfBb eE1bRgNcDpO9g36GUEDtyd4nbIHZzB2RYsoyoA67uzwe45+vDvsees3TmrzSvcZsrow+ zqwg== 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 x15si26120267pgi.524.2019.04.07.19.35.09; Sun, 07 Apr 2019 19:35:25 -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 S1726626AbfDHCeY (ORCPT + 99 others); Sun, 7 Apr 2019 22:34:24 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:33202 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbfDHCeY (ORCPT ); Sun, 7 Apr 2019 22:34:24 -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 1hDK72-0005fI-7W; Mon, 08 Apr 2019 10:34:20 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hDK6y-0003Bm-Sj; Mon, 08 Apr 2019 10:34:16 +0800 Date: Mon, 8 Apr 2019 10:34:16 +0800 From: Herbert Xu To: NeilBrown Cc: Thomas Graf , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] rhashtable: use bit_spin_locks to protect hash bucket. Message-ID: <20190408023416.kauuomnkwouyfdfg@gondor.apana.org.au> References: <155416000985.9540.14182958463813560577.stgit@noble.brown> <155416006521.9540.5662092375167065834.stgit@noble.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <155416006521.9540.5662092375167065834.stgit@noble.brown> 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 Hi Neil: On Tue, Apr 02, 2019 at 10:07:45AM +1100, NeilBrown wrote: > > @@ -263,13 +311,13 @@ void rhashtable_free_and_destroy(struct rhashtable *ht, > void *arg); > void rhashtable_destroy(struct rhashtable *ht); > > -struct rhash_head __rcu **rht_bucket_nested(const struct bucket_table *tbl, > - unsigned int hash); > -struct rhash_head __rcu **__rht_bucket_nested(const struct bucket_table *tbl, > - unsigned int hash); > -struct rhash_head __rcu **rht_bucket_nested_insert(struct rhashtable *ht, > - struct bucket_table *tbl, > +struct rhash_lock_head __rcu **rht_bucket_nested(const struct bucket_table *tbl, > + unsigned int hash); I don't think this opaque type should be marked as __rcu. Because you can't directly dereference it and once you put it through rht_ptr then that's the pointer that should carry the __rcu marker. If you add the __rcu here then you generate a lot of extra noise in the code that isn't needed. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt