Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753473AbbK3KTM (ORCPT ); Mon, 30 Nov 2015 05:19:12 -0500 Received: from helcar.hengli.com.au ([209.40.204.226]:59082 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbbK3KTL (ORCPT ); Mon, 30 Nov 2015 05:19:11 -0500 Date: Mon, 30 Nov 2015 18:18:59 +0800 From: Herbert Xu To: Phil Sutter , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, tgraf@suug.ch, fengguang.wu@intel.com, wfg@linux.intel.com, lkp@01.org Subject: Re: [PATCH v2 0/4] improve fault-tolerance of rhashtable runtime-test Message-ID: <20151130101859.GA8378@gondor.apana.org.au> References: <1448039840-11367-1-git-send-email-phil@nwl.cc> <20151130093755.GA8159@gondor.apana.org.au> <20151130101401.GA17712@orbit.nwl.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151130101401.GA17712@orbit.nwl.cc> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2030 Lines: 50 On Mon, Nov 30, 2015 at 11:14:01AM +0100, Phil Sutter wrote: > On Mon, Nov 30, 2015 at 05:37:55PM +0800, Herbert Xu wrote: > > Phil Sutter wrote: > > > The following series aims to improve lib/test_rhashtable in different > > > situations: > > > > > > Patch 1 allows the kernel to reschedule so the test does not block too > > > long on slow systems. > > > Patch 2 fixes behaviour under pressure, retrying inserts in non-permanent > > > error case (-EBUSY). > > > Patch 3 auto-adjusts the upper table size limit according to the number > > > of threads (in concurrency test). In fact, the current default is > > > already too small. > > > Patch 4 makes it possible to retry inserts even in supposedly permanent > > > error case (-ENOMEM) to expose rhashtable's remaining problem of > > > -ENOMEM being not as permanent as it is expected to be. > > > > I'm sorry but this patch series is simply bogus. > > The whole series?! Well at least patch two and four seem clearly wrong because no rhashtable user should need to retry insertions. > Did you try with my bogus patch series applied? How many CPUs does your > test system actually have? > > > So can someone please help me reproduce this? Because just loading > > test_rhashtable isn't doing it. > > As said, maybe you need to increase the number of spawned threads > (tcount=50 or so). OK that's better. I think I see the problem. The test in rhashtable_insert_rehash is racy and if two threads both try to grow the table one of them may be tricked into doing a rehash instead. I'm working on a fix. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- 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/