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 X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12C9EC76191 for ; Mon, 15 Jul 2019 20:51:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DED3F21738 for ; Mon, 15 Jul 2019 20:51:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563223867; bh=6m3JRkZe4W2eR9x3TEB42iTGm06AKnl0iKV7troXRVI=; h=In-Reply-To:References:From:To:Cc:Subject:Date:List-ID:From; b=KnafvMXKoAOw/qdH4VwhnsDbuwl0JHf6BoMt5N5xUi3JWXc3mVrR4dHT4tnriT0xE uc0Hm14Gxn9vpV28RToZnqk7du9vgpRIBgmp0il/Tc74XUg8Iv6txmvJ2BYsFwSYFP SMmz1eOQtbS3nxe8vCSkWAjGpIZfpS3mH4XMJ7jY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731054AbfGOUvD (ORCPT ); Mon, 15 Jul 2019 16:51:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:59372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729640AbfGOUvC (ORCPT ); Mon, 15 Jul 2019 16:51:02 -0400 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB55B2145D; Mon, 15 Jul 2019 20:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563223861; bh=6m3JRkZe4W2eR9x3TEB42iTGm06AKnl0iKV7troXRVI=; h=In-Reply-To:References:From:To:Cc:Subject:Date:From; b=EwqhqpJU1AH9O3azv7tLQPtK6CGIx5+N25Vfxpts0j2Zu9LzI8K3EVF6FF7FMlJqe HqZdyATMk1hx4CfnLLeNhVn8jZBCw/KN0Ip/RXuDu+/ZJV8+T7LRYZFf0rRh6wit2r FZCr9nMrPp9Qn2lqNejmYhOwnPlNfDt+4lLfsG/0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20190712081744.87097-1-brendanhiggins@google.com> <20190712081744.87097-3-brendanhiggins@google.com> <20190715202425.CE64C20665@mail.kernel.org> From: Stephen Boyd To: Brendan Higgins Cc: Frank Rowand , Greg KH , Josh Poimboeuf , Kees Cook , Kieran Bingham , Luis Chamberlain , Peter Zijlstra , Rob Herring , shuah , Theodore Ts'o , Masahiro Yamada , devicetree , dri-devel , kunit-dev@googlegroups.com, "open list:DOCUMENTATION" , linux-fsdevel@vger.kernel.org, linux-kbuild , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , linux-nvdimm , linux-um@lists.infradead.org, Sasha Levin , "Bird, Timothy" , Amir Goldstein , Dan Carpenter , Daniel Vetter , Jeff Dike , Joel Stanley , Julia Lawall , Kevin Hilman , Knut Omang , Logan Gunthorpe , Michael Ellerman , Petr Mladek , Randy Dunlap , Richard Weinberger , David Rientjes , Steven Rostedt , wfg@linux.intel.com Subject: Re: [PATCH v9 02/18] kunit: test: add test resource management API User-Agent: alot/0.8.1 Date: Mon, 15 Jul 2019 13:51:00 -0700 Message-Id: <20190715205101.AB55B2145D@mail.kernel.org> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Quoting Brendan Higgins (2019-07-15 13:30:22) > On Mon, Jul 15, 2019 at 1:24 PM Stephen Boyd wrote: > > > > Quoting Brendan Higgins (2019-07-12 01:17:28) > > > diff --git a/kunit/test.c b/kunit/test.c > > > index 571e4c65deb5c..f165c9d8e10b0 100644 >=20 > > One solution would be to piggyback on all the existing devres allocation > > logic we already have and make each struct kunit a device that we pass > > into the devres functions. A far simpler solution would be to just > > copy/paste what devres does and use a spinlock and an allocation > > function that takes GFP flags. >=20 > Yeah, that's what I did originally, but I thought from the discussion > on patch 01 that you thought a spinlock was overkill for struct kunit. > I take it you only meant in that initial patch? Correct. I was only talking about the success bit in there.