Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3910186imm; Mon, 4 Jun 2018 11:17:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLj9lxiNQg8hr36OyeK1OHqIvZNPTXQz+W7gJeQ4RipwFqn57H5FfFBF58NRv23UagxhZzz X-Received: by 2002:a65:5003:: with SMTP id f3-v6mr18206550pgo.425.1528136222860; Mon, 04 Jun 2018 11:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528136222; cv=none; d=google.com; s=arc-20160816; b=akDFta5EFlh3nqgnrU2ZgA9xGrhqIt+yJaXuXB/woAgk1puu+XnErv3GPGt02LSCXJ xfp+z9xUq5WM6hgRi8rJxQLDpvUTURcMebMH6l/C/k949kj+PuEjOWEytWGI3tDDA17D 3nGX9KH/j4HT3iGtk07ZapEEnhHwzaHGd/2UDSDQr5FhNu2eKp6xFLPGEKkzP+7ZmHhf 78ZRnqieQVNH8lZImL0M3k/4GRzW/+5tKAIZGTDdW9pwnaGsCMnQ3LQadbvjTOgkZXmm iPQgwdpr0YRRGGwUYRUUguqPB3SvhnYpgIz5N4QTfOBjjwCKpceQSg2sfSxrMBb9nCiq 6ZGg== 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:dkim-signature:arc-authentication-results; bh=sRRBQgh9iD3kdSK3c+xhOvrY9oxw5s6fyH3yOyefBNk=; b=vC1RhRrvAAotjaHmPUMifSK5Fs+xPKA8PYr9sfXT0A7itXp81Y8Pv42UsFZKcmNiEL cGcRv19HGnHNk979XddI79CPqiuASZcPpfpkZdzCO2+FeUHCxXYCYrhu/fRwxDtW8NP6 NBZpd/bSdLv/LH5k2/Dqr+XDzbgpBew/kYR+e8kUmC9HZ+WhF0nUdw8W3daBEisC2TLY 2etLdGIS74scpi8wzt0E3WAFT1IZ1FPI0WP7rZ72jts89TNPnjXnDjJiEhYRp0nh6pz0 yatx59UUqS1BF+TPPtt9YuC9YO60NbW7Jnhgl/Bni5AsX9NsJMfOVEL0xr02d26W773p 4c8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=S/tOQa+n; 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 y17-v6si30841050plp.485.2018.06.04.11.16.47; Mon, 04 Jun 2018 11:17:02 -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=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=S/tOQa+n; 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 S1751242AbeFDSQP (ORCPT + 99 others); Mon, 4 Jun 2018 14:16:15 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:53615 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750987AbeFDSQN (ORCPT ); Mon, 4 Jun 2018 14:16:13 -0400 Received: by mail-wm0-f68.google.com with SMTP id x6-v6so87384wmc.3 for ; Mon, 04 Jun 2018 11:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sRRBQgh9iD3kdSK3c+xhOvrY9oxw5s6fyH3yOyefBNk=; b=S/tOQa+n+vvA3SplG/kydPWizAOtqjPYKHTbvzrz7p2MsAOnYqhCXZEaSJH3SHBIHL 7iw2M5FnCxncDlTcDSBEcAWl6daV3gWGmqsPl78K5WQFXt+TchptI0SQX/hzMGGwAotF qW8E0vgcerYBwCDwzi9KxfWMJ6zXWCf/jK52NJ20QF1nPau5/Evaub2+ZDQjP7KRxm9u mEqECXl/z2p/RDN+l9mN/5MAXkq/FugAmJXoYs3e0/00rixYazhHlg3wgvhRf6KGAuPx vXwzNN70QnuSS6TtIR/ZDCsMBdR6RyCWhjVpL9dD5sC4Ol1NgCdjUIL4HBaBofNLNRxb OMQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sRRBQgh9iD3kdSK3c+xhOvrY9oxw5s6fyH3yOyefBNk=; b=sDGMu8ZH4pv8lPKMtS6KaHxbZno4aMnvAvHeCq3fQ7gq4uF7O9fO1sECvteYKvUw2N fuh64jYclqtlaCsDOsgRNJsywEV4KDi6ViQO1pC/zNq2HT8yZlecVg2EUAbAcFKkO7r3 pF/6zq4pHmaA9jV4X2jlUFKRdqGzxH79B2XfMUG81IuBly1sqmUxPNdYMo0sDnQbZhlk QF9+FZcf3s1z42SL9j8xaJNV/J6pSegRu+m4osFWVJ4dptbg8WMsfgK5EZmL5bamTrIZ hV3LKJyGgl4OBrlNUFn6Oy0KAMefjA9Z/lAgbJIbh6blNoKr8VyMdspYynH4O5DcKIJG Ul9Q== X-Gm-Message-State: APt69E2jOS+OPlGKAiiqEyHxEsQpQ2ZbPQ/qS74Cf5miKbdlY5qQ1bsf MYQde9lT4qQAX9ZFzmIoHm3F1g== X-Received: by 2002:a50:b286:: with SMTP id p6-v6mr12409572edd.22.1528136172365; Mon, 04 Jun 2018 11:16:12 -0700 (PDT) Received: from netronome.com (penelope-musen.amstelveen.horms.nl. [2001:470:7eb3:404:c685:8ff:fe7c:9971]) by smtp.gmail.com with ESMTPSA id n30-v6sm14895324edd.36.2018.06.04.11.16.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 11:16:11 -0700 (PDT) Date: Mon, 4 Jun 2018 20:16:10 +0200 From: Simon Horman To: NeilBrown Cc: Eric Dumazet , Herbert Xu , Thomas Graf , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH 15a/18] rhashtables: add lockdep tracking to bucket bit-spin-locks. Message-ID: <20180604181609.sssd4ao6wfwj3il6@netronome.com> References: <152782754287.30340.4395718227884933670.stgit@noble> <152782824984.30340.1634082820568216846.stgit@noble> <20180602050322.liesw324q5kawcue@gondor.apana.org.au> <9bea77df-e7db-677a-31b2-710dc6d956ee@gmail.com> <871sdnqty4.fsf@notabene.neil.brown.name> <87po17p8jd.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87po17p8jd.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, Jun 04, 2018 at 12:52:54PM +1000, NeilBrown wrote: > > Native bit_spin_locks are not tracked by lockdep. > > The bit_spin_locks used for rhashtable buckets are local > to the rhashtable implementation, so there is little opportunity > for the sort of misuse that lockdep might detect. > However locks are held while a hash function or compare > function is called, and if one of these took a lock, > a misbehaviour is possible. > > As it is quite easy to add lockdep support this unlikely > possibility see to be enough justification. nit: s/see/seems/ > > So create a lockdep class for bucket bit_spin_lock as attach > through a lockdep_map in each bucket_table. > > With the 'nested' annotation in rhashtable_rehash_one(), lockdep > correctly reports a possible problem as this lock it taken > while another bucket lock (in another table) is held. This > confirms that the added support works. > With the correct nested annotation in place, lockdep reports > no problems. > > Signed-off-by: NeilBrown