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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D18D4C433F5 for ; Tue, 28 Sep 2021 13:50:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84AA1611CC for ; Tue, 28 Sep 2021 13:50:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 84AA1611CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:45882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVDUp-00006d-If for qemu-devel@archiver.kernel.org; Tue, 28 Sep 2021 09:50:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVDRg-0005Lb-7U for qemu-devel@nongnu.org; Tue, 28 Sep 2021 09:46:56 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:37466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVDRd-0007Be-T9 for qemu-devel@nongnu.org; Tue, 28 Sep 2021 09:46:55 -0400 Received: by mail-wm1-x32f.google.com with SMTP id r83-20020a1c4456000000b0030cfc00ca5fso2346706wma.2 for ; Tue, 28 Sep 2021 06:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=QJq7O7Zs54F64OCT3CA3FpvLyJ3CpNnOZX4hwWKKcnY=; b=NVKbElAvY9nga92tyQMr6xJ8UH7cOHAtDtvGZo3vOoF/LIi+IIws+c2fymCvoqRxZM t0iLO0tHo7wxzUcpuzJ5GgeFYOf80JgFzJXJYAbOB4YXAvLLA4CYyRJ0MxExIWDgCHvk 8J6iS1SO3UmBlOKA65JdpWS/hDCoEzQ4Nufv6+0MIEOpmyIYesu7XS+wPfikXgtSKMGD FeYULR/ngacTiz/LJ0dOrI0cP+r1oUxWu2CCGWlhZ/hELt1gdsM99DcMVAXHokOyuly9 UT/1t5+olkdqjz5BzPTzc0zhmqbmBM/fm0YdbO/ifnZmCRTjZDlTZ0G4Dn1YB6j5ekW/ d6Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=QJq7O7Zs54F64OCT3CA3FpvLyJ3CpNnOZX4hwWKKcnY=; b=WBMWbQCMlq0bktFW82eLRIImEFEp6m3ud9/Z+ARwzuBs7ZpkjWe76qhgycSf4vuQUp VKX0URU8h5T5QDSzFXfK/5re8or124Wnpgy38YQyxpFkxJ3Yc9DauIHMeBq2TT/KTEp5 XDEbnTLNffzRK1kHu25LJK364DinNCrC0rL3mHhNf3vteG2aSCDO3S2uq29+EqQaw5lt EbDp5PusJkNvbuxC+ENHizrzxbpJ/7rjBYtlV5gMerCeghB6bR85jsWFWQUAPRwv+2/q wBPDR8IlY7/uyj5UL6Uu/YHJ5JE9f0TiCKdqjuyLi3hRnYy7ZAHRnXE9ov5JhRU8er1r VuRw== X-Gm-Message-State: AOAM530s86JzgJYNYQs+O7nu0+GdkZifCZw7EttdRRiny6Y0xw4a7Tac tpOzXBhWKbGv2KcO5/0LNncbRw== X-Google-Smtp-Source: ABdhPJzTdfAWMgPTakegVnbp9oTBRG3Uyz6fzbQ0a7E+UMPthHwUwSz7AMS7c66i+3bkfrEjAd1Xlg== X-Received: by 2002:a7b:c194:: with SMTP id y20mr4794399wmi.37.1632836811749; Tue, 28 Sep 2021 06:46:51 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b15sm1918760wru.9.2021.09.28.06.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 06:46:50 -0700 (PDT) Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 179BE1FF96; Tue, 28 Sep 2021 14:46:50 +0100 (BST) References: <2431106.PTX978RE0L@silver> <20210927125940.3ef12485@bahia.huguette> <1811981.VuayHpH01O@silver> User-agent: mu4e 1.7.0; emacs 28.0.50 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Christian Schoenebeck Subject: Re: [PATCH v3 0/5] introduce QArray Date: Tue, 28 Sep 2021 14:37:45 +0100 In-reply-to: <1811981.VuayHpH01O@silver> Message-ID: <87v92k7qyd.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Richard Henderson , Greg Kurz , Markus Armbruster Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Christian Schoenebeck writes: > On Montag, 27. September 2021 12:59:40 CEST Greg Kurz wrote: >> On Mon, 27 Sep 2021 12:35:16 +0200 >>=20 >> Christian Schoenebeck wrote: >> > On Dienstag, 31. August 2021 14:25:04 CEST Christian Schoenebeck wrote: >> > > On Dienstag, 31. August 2021 13:58:02 CEST Greg Kurz wrote: >> > > > On Thu, 26 Aug 2021 14:47:26 +0200 >> > > >=20 >> > > > Christian Schoenebeck wrote: >> > > > > Patches 1 and 2 introduce include/qemu/qarray.h which implements= a >> > > > > deep >> > > > > auto free mechanism for arrays. See commit log of patch 1 for a >> > > > > detailed >> > > > > explanation and motivation for introducing QArray. >> > > > >=20 >> > > > > Patches 3..5 are provided (e.g. as example) for 9p being the fir= st >> > > > > user >> > > > > of >> > > > > this new QArray API. These particular patches 3..5 are rebased o= n my >> > > > > current 9p queue: >> > > > > https://github.com/cschoenebeck/qemu/commits/9p.next >> > > >=20 >> > > > > which are basically just the following two queued patches: >> > > > This looks nice indeed but I have the impression the same could be >> > > > achieved using glib's g_autoptr framework with less code being add= ed >> > > > to QEMU (at the cost of being less generic maybe). >> > >=20 >> > > I haven't seen a way doing this with glib, except of GArray which has >> > > some >> > > disadvantages. But who knows, maybe I was missing something. >> >=20 >> > Ping >> >=20 >> > Let's do this? >>=20 >> Hi Christian, >>=20 >> Sorry I don't have enough bandwidth to review or to look for an alternate >> way... :-\ So I suggest you just go forward with this series. Hopefully >> you can get some reviews from Markus and/or Richard. > > Ok, then I wait for few more days, and if there are no repsonses, nor vet= os=20 > then I'll queue these patches anyway. As far as I can make out the main argument for introducing a QEMU specific array handler is to avoid needing to use g_array_index() to reference the elements of the array. This in itself doesn't seem enough justification to me. I also see you handle deep frees which I admit is not something I've really done with GArray as usually I'm using it when I want to have everything local to each other. > > Best regards, > Christian Schoenebeck --=20 Alex Benn=C3=A9e