Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp142147imm; Mon, 4 Jun 2018 14:38:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKrVXyxmCgAyB6NHJR51gv92QnNNKKPqZ5DuGXvsBSi+Dnt4CU3EW9fLCpvwKtlMS3u2YKF X-Received: by 2002:a62:1013:: with SMTP id y19-v6mr22844085pfi.166.1528148309336; Mon, 04 Jun 2018 14:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528148309; cv=none; d=google.com; s=arc-20160816; b=I6JIZ1t/pOQAVCOTEgt9lAuyI0euc7Oykd6Qrg3r8veNiSXlspBm/ciTyyWeT6MMcp GSzrhYQnKiJ6ibDi9hsG81kPOuoCcU3KyTad+x4sksBELz0qDFPUSXUMwEgphmGfA4ku dfOa5uz6y0zOfWb2jv9qgMMR87N2vJfv4lznoHZuQt9YsAEwWCl0hLweFYCAx9rpzmnV Ml7FPFGKI8Q7+lu7UMRvq/l+g9sAHiV9uZevBv8Z/M2NCP7BH+6UCtU4bKvBoZslLzwU LiV0fLM+v9A5+spGe5mF8ag4bpSxEjGRAbJhwoJ1zGayk7vJc2gKg/UG68Z+li8agL3J F1dg== 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=kBg7CjA50qBtG79BNnBFfJV8MHvR144n1sCd9L0Nytw=; b=vdfh7rytF9APl4gLFf+q/26kUAo7U1RORGag0dEWsUgp0vWPVsHcSfmcxNJP5Rzzmk im39k7+F7LrpPjayFqpcgWtYbjQxhXQDlfUYi/1jPkRiNB8omL8gb6NdUI7Q4JwR6R3x MTacoVEA8JKuJ5hTvjvpUEwzaGqhBUhn5HHGydlB1kDHpOHzIkTqZkYi9bnzf248UG6e +IGyKpm1Q8SNEAmjt2CEaYRmNLG/peoNEOoGDNB+uI1k87tnnOKMMY5MSQ8AjbRmbvN2 3kodIPKGDvW3cuGnGyujHFAl37qXq1YeqrqK83XREkNd8PjqOVi+fYmC/xETRgtsYX+R mYlg== 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 a5-v6si36149421plp.178.2018.06.04.14.38.14; Mon, 04 Jun 2018 14:38:29 -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 S1751315AbeFDVhw (ORCPT + 99 others); Mon, 4 Jun 2018 17:37:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:34867 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbeFDVhu (ORCPT ); Mon, 4 Jun 2018 17:37:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 76348AD21; Mon, 4 Jun 2018 21:37:49 +0000 (UTC) From: NeilBrown To: Simon Horman Date: Tue, 05 Jun 2018 07:37:40 +1000 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. In-Reply-To: <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> <20180604181609.sssd4ao6wfwj3il6@netronome.com> Message-ID: <87bmcqp717.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 Mon, Jun 04 2018, Simon Horman wrote: > On Mon, Jun 04, 2018 at 12:52:54PM +1000, NeilBrown wrote: >>=20 >> Native bit_spin_locks are not tracked by lockdep. >>=20 >> 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. >>=20 >> As it is quite easy to add lockdep support this unlikely >> possibility see to be enough justification. > > nit: s/see/seems/ > Thanks :-) I've made that change for when I formally submit. Thanks, NeilBrown >>=20 >> So create a lockdep class for bucket bit_spin_lock as attach >> through a lockdep_map in each bucket_table. >>=20 >> 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. >>=20 >> Signed-off-by: NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlsVsSQACgkQOeye3VZi gbmEww//cMQG+c3/pbeLG/h4fUrcJmCLEmAk3V41/BxPNKCmfjvvL3No063PNJ/6 9zW4PUJKRCOIh6eiuDaMzAo02oCeO6KLuBWUPcwJa3bkl1J3K8FHGcsh2yC6wKPy 8O1Z00ivQ/iP6X9vi4raG/s+wiqCrRas2Olcp9MU+XURPORiV2AqdTdeIco6mfuH vr5HePpBIwdd3w4Z3Eb0Zgf2sanPIixJPwB1hmiUhV+rE1jiI5P3185QSFe63jny RzDudmuMDs41PxUX6LKx+MS4lCfAHkJDtiW0W322rxgd6qdE8oha3iyveWKmXsLd RqX9E1/XWxZBDICIKX467NCjyjjClY4eMNWrIeM6uQnHmI16lnoUUw7PqrUE3mqJ rTWqAa6mhZnh79w2flPpi/GG5f1Rx59u86yf28X+PQXTmT7p/gVNdU3HlbSNV+v+ V4+24l5Ds5pLwk++2odzQFGDLTPSRcme1APoTfBoReiuA2uWHVlkfIjZw9LPFkhC d2Y71PJsUkwkXX3ug0otG+dnttZoOWoWlfZmhYmJp0sqKvciOOJH/Ngq00iJ/xca dpg55NYtGxz2ue2biaFh3Yc7dmTGbVX6+Yx+Rt8aVbtxhy5PAPz9f/V9i4inBJS5 G6mt8w+APDLh9FibOtfNgb1XtASSmAvHCoL8w4r1Zul3hHBnnm0= =c8jk -----END PGP SIGNATURE----- --=-=-=--