From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB894C072A2 for ; Fri, 17 Nov 2023 21:01:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232324AbjKQVB2 (ORCPT ); Fri, 17 Nov 2023 16:01:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjKQVB0 (ORCPT ); Fri, 17 Nov 2023 16:01:26 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 535CCB6 for ; Fri, 17 Nov 2023 13:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=5mfV+DgfqPl4p5DpHJl48MYnAolYpikcrh23wrymsUY=; b=lVm2nByAwRxpcrMfhL/tTYrKlK /75ageUnCDWa6rSr4bDm5m6vML0X5fNieWRZnZrCll7CmoCb7flkRLnxM8jmNR0jPEVJs1w3ZMc/c ORO6zVn/AAcivrs+yzRIDnOqsyMAk2fAntdupDISTD/Hvg+oNJ9yfPKQfLn+dmnHMgNwSE1WBE/Ec OkFqkH4wrSQdKQDWad8grQbO1GJHXmlvxzqMpe5w/xf9taQufbnpTbKpmn1HcbjhJ80y1fwDxCHl3 Bvk+ppkB6ZxchnrZ6LL1/QlMjstTZITmIa2+ydT2CmOUkrK8XW9CHc5/6pqnE2v2Jecd27jRVaZ/Y 4rxrjYvA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1r45xm-007HX9-0t; Fri, 17 Nov 2023 21:01:18 +0000 Date: Fri, 17 Nov 2023 13:01:18 -0800 From: Luis Chamberlain To: Matthew Wilcox Cc: kernel test robot , Daniel Gomez , oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, "gost.dev@samsung.com" , Pankaj Raghav Subject: Re: [PATCH 1/2] test_xarray: add tests for advanced multi-index use Message-ID: References: <20231104005747.1389762-2-da.gomez@samsung.com> <202311152254.610174ff-oliver.sang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 17, 2023 at 08:58:05PM +0000, Matthew Wilcox wrote: > On Fri, Nov 17, 2023 at 12:54:09PM -0800, Luis Chamberlain wrote: > > +/* > > + * Can be used in contexts which busy loop on large number of entries but can > > + * sleep and timing is if no importance to test correctness. > > + */ > > +#define XA_BUG_ON_RELAX(xa, x) do { \ > > + if ((tests_run % 1000) == 0) \ > > + schedule(); \ > > + XA_BUG_ON(xa, x); \ > > +} while (0) > > That is awful. Please don't do that. You're mixing two completely > unrelated thing into the same macro, which makes no sense. Not only > that, it's a macro which refers to something in the containing > environment that isn't a paramter to the macro. I figured you'd puke. Would you prefer I just open code the check on the loop though? I'm sure another alternative is we *not care* about these overloaded systems running the test. What would you prefer? Luis