Received: by 10.213.65.68 with SMTP id h4csp1012999imn; Wed, 28 Mar 2018 18:14:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx491V+b+Wy7V4txmNqW46LIDQwUmhEA3n5PPfLxw5eUC18PCseO7+jljOkL1tHaW6NTmJ3T/ X-Received: by 10.167.130.26 with SMTP id k26mr4666255pfi.77.1522286091288; Wed, 28 Mar 2018 18:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522286091; cv=none; d=google.com; s=arc-20160816; b=G8LbDR54E5svYIjCqGEOzsd5xoCjz2wIThfhHh42rh3NmALG/8zogvPlLR6uKf2A3v bi25SS+qVKRa1/tX4MlFDrTQOc7Nw5YrLDR3u91tP5Y6IH/AckuKDUwNThHzEJZLEndO 3nh+DgoLzT+jz5x0rXeP72sk3B4PI4bgaGqX/8YWX3Di9S8bHFsOmOm9Bkj7RKDuRW66 zEi6B2o0xCkFWIi5f8waOH2g5Wm4SKZ6QUzsPTWy3EyTQ9JEeIcSAxWxOOJl1r11HaeG R4RFHuKvQE6IfXHZAk9/YuQFNAxN0go84ahiaEPNRM6YMAtds6h2C0gPGDRUXmbJCdJT 2oWA== 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=1S+QTKleQQc8jCebg0syvKxVOmIpxRxmWIO2c5aNgmk=; b=amhkM/ccIc3e2ItovsLuIF1UwSpXe8gDqa0ubZrV9jJlSbUKEYMfcFq93YQ4akGIEZ pCl4ksXAKRjOBPKvKbeww17oOVY+LlnLc7EdvF4/9zsa9oMJ2/eeOVRTNg04610x7pXC IHa35lQ+xAMW8AcMJUAzVv3S06we9RfCKPBiSLqp8QkHWFPrMNkl35s5L+IdGybrXtsW rwPCRR2o5NjmHyuYLHo9Lwe+mBi5EoC2vwudeOF118f+embhZEg2NPR1jUoFsZteTUwY J2j3eEVOfcWf8MFxSOOCmPhInj3loPmYH0GbUb7ycNqdHTP3OSczCoW8LATV3sD208Cz Dbvg== 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 f59-v6si5004944plf.38.2018.03.28.18.14.34; Wed, 28 Mar 2018 18:14:51 -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 S1751750AbeC2BNi (ORCPT + 99 others); Wed, 28 Mar 2018 21:13:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:43408 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750971AbeC2BNh (ORCPT ); Wed, 28 Mar 2018 21:13:37 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5D99EACCB; Thu, 29 Mar 2018 01:13:36 +0000 (UTC) From: NeilBrown To: Herbert Xu Date: Thu, 29 Mar 2018 12:13:24 +1100 Cc: Thomas Graf , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/6] rhashtable: allow a walk of the hash table without missing objects. In-Reply-To: <87zi2r3mve.fsf@notabene.neil.brown.name> References: <152210688405.11435.13010923693146415942.stgit@noble> <152210718430.11435.5761213978298714527.stgit@noble> <20180327155118.GB14001@gondor.apana.org.au> <87po3p421q.fsf@notabene.neil.brown.name> <20180328060734.GB16291@gondor.apana.org.au> <87a7us4qje.fsf@notabene.neil.brown.name> <20180328073023.GB17306@gondor.apana.org.au> <87zi2r3mve.fsf@notabene.neil.brown.name> Message-ID: <87tvsz3cqz.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 On Thu, Mar 29 2018, NeilBrown wrote: > > How about storing the hash chains in order by object address? > Then rhashtable_walk_start() can easily find it's place regardless of > whether the old object was still present or not, using <= on the > address. > "Insert" would need to record an insert location and insert there rather > than at the head of the chain. > I might try coding that. Unfortunately rhltables make this approach unworkable. However while trying to write the code I found a bug :-( I'll post a patch for the bug, and a patch to transparently make the current interface more reliable when the caller keeps the current object in the table. I think this is sufficient for all current use-cases. Thanks, NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlq8PbUACgkQOeye3VZi gbm+qxAAss8awx1WkFlUay4HMozYWAxT9useCEUPcVjVrb2T9zBgmbJ2FK49PShG i1Oki5t9CG7y2VYPt9I32wJdMjL6/PlzNV3OEXqNsvGKJwekoGX8qIJxyYjS7F9E 0W9gQhWKcjrZnBjDZT/bdfF1EAXpQ3U/pBA/jkLAZdTtTTu1sKO0FXW00sA9Gwwr KBNp5TZGgQNz/Qm3G4lLQMDVxi9YF5K4LyZlL8v1XUU6lGqArWwUZiPAzUvsrJtp GBvpVzPFNfdA6bYHJaY7tsxzIvIAQ33Yk2fjoGgaPOANvYnehGzBgb8aN8CmcwAM yYQRvOk8q3M8//bHRURcOl+Up4X6p7wLclC0tllgmAxybeRbaPq/FC/Pd1MrU8BN fMFU40PlSoE2W//NxkwLjKBFZOj5W0oVUfkLi0L3lscL2UyKuaedTfhpVkdqJcW5 yhUraxHmvXD4fVmKIDRg1eL3byZxscBHtUkl+3F78DiDrz19VQULHC62lQpM82ez NldL7ufsklRel59U3gEf9QMLVeFPKu4LD+kN3IguDoSdEBTnGj+FYVuSQA54+mNG aMiMYNDfi+uD0rHbe32mDzL4xXWACPUkyQAMnbq+y/0Fr5T3Pdj2sRcu0oZaUZBl OrS1xEZyV9kZ6tEKULS61Lakwpe2ZKgfimXSREg02CXriGL0Y+k= =6cxa -----END PGP SIGNATURE----- --=-=-=--