Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967144AbbLQQHM (ORCPT ); Thu, 17 Dec 2015 11:07:12 -0500 Received: from mail-ig0-f182.google.com ([209.85.213.182]:38541 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966354AbbLQQHJ (ORCPT ); Thu, 17 Dec 2015 11:07:09 -0500 MIME-Version: 1.0 In-Reply-To: References: <1448039840-11367-1-git-send-email-phil@nwl.cc> <20151130093755.GA8159@gondor.apana.org.au> <20151130101401.GA17712@orbit.nwl.cc> <20151130101859.GA8378@gondor.apana.org.au> <20151203124129.GA5505@gondor.apana.org.au> <20151217084809.GC9239@gondor.apana.org.au> Date: Fri, 18 Dec 2015 00:07:08 +0800 Message-ID: Subject: Re: rhashtable: Prevent spurious EBUSY errors on insertion From: Xin Long To: Herbert Xu Cc: Phil Sutter , davem , network dev , linux-kernel@vger.kernel.org, tgraf@suug.ch, fengguang.wu@intel.com, wfg@linux.intel.com, lkp@01.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1451 Lines: 36 On Thu, Dec 17, 2015 at 5:00 PM, Xin Long wrote: > On Thu, Dec 17, 2015 at 4:48 PM, Herbert Xu wrote: >> On Thu, Dec 17, 2015 at 04:46:00PM +0800, Xin Long wrote: >>> >>> sorry for late test, but unfortunately, my case with rhashtalbe still >>> return EBUSY. >>> I added some debug code in rhashtable_insert_rehash(), and found: >>> *future_tbl is null* >>> >>> fail: >>> /* Do not fail the insert if someone else did a rehash. */ >>> if (likely(rcu_dereference_raw(tbl->future_tbl))) { >>> printk("future_tbl is there\n"); >>> return 0; >>> } else { >>> printk("future_tbl is null\n"); >>> } >>> >>> any idea why ? >> >> That's presumably because you got a genuine double rehash. >> >> Until you post your code we can't really help you. >> > i wish i could , but my codes is a big patch for sctp, and this issue > happens in a special stress test based on this patch. > im trying to think how i can show you. :) I'm just wondering, why do not we handle the genuine double rehash issue inside rhashtable? i mean it's just a temporary error that a simple retry may fix it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/