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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3A2A0C433EF for ; Tue, 25 Jan 2022 11:11:04 +0000 (UTC) Received: from localhost ([::1]:60808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCJj4-0001tm-Uz for qemu-devel@archiver.kernel.org; Tue, 25 Jan 2022 06:11:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCJgq-00087n-5K for qemu-devel@nongnu.org; Tue, 25 Jan 2022 06:08:45 -0500 Received: from [2607:f8b0:4864:20::229] (port=34359 helo=mail-oi1-x229.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nCJgl-0005qa-T6 for qemu-devel@nongnu.org; Tue, 25 Jan 2022 06:08:43 -0500 Received: by mail-oi1-x229.google.com with SMTP id bb37so30275657oib.1 for ; Tue, 25 Jan 2022 03:08:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IUR9BX7Cb6GdW9DgtiMwyQwBOlcjuLzKb/XeuyQtN/o=; b=ODeOKPdKo5gpHaIqWvgRjooqy9OhN3IsEF1o/WTmya7XkDlbgdMpN22DTdjDF8ldF9 pYCoVtMLs3P7lKT3Sf86a+Ed75UyLDgEXhGq66izAvtRj0YONnlDaoVgOoAQ9mTLdmLc /OrrqvnQIky5XJoIe5DejlvZdylZFJk7Wjn0IeAfz2Kefpe9I7goQvtrlz0k/2MBOt1g YLNv+EC/ZdzHWG74SWiZzzkI8RGjqAk9gN+5b+i0Sbs4wAEV5Qx/2K73nm/F9uHnehbt lIy3S4KKs8jWik8wuKEnTPS5pWUw02dPU2oOgY0oXbXLbHDsbuZw958czS7L/zfsKDpd 4VOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IUR9BX7Cb6GdW9DgtiMwyQwBOlcjuLzKb/XeuyQtN/o=; b=t5B+5cFB1ieDCZjFrAyEbWRrsMr/IngZd+uwYOz43gKJe3uPAKXICripxlFTUPH+fi DIB5vghpmqazJFLS90FznU6SSNt7ZxTZE0KlaznWku6LyZaWECmU0xY7JRaOQ9WfSMBz IIjEitSVizgdTOKnNEz6ZNnXjSw6rtluNSP0uUjfTeXZxJ9mCFFlAejZ3kJmSc6oPhVf MdZXDAUuQR6T/ZTN+yh0R85BX+ynMNcV24n/MAgHX6D2Bg574Gi6eN4ifFuI7wzIjqE+ fEYt5IIM7d1s7d+uTaLsweOATYqKx0m4Sf0lvIWywJU5XTxUIYS7XSAlLhWS8MgeeiSs Zeyw== X-Gm-Message-State: AOAM531ihH3fEqDoXb2alBCLbX7c4bUrD7Z/SS+7FcaNrDlXpzPoHGGN Oueo2txAt8jP8IwGfYZgAHyxH5OElDPOB4doEK8= X-Google-Smtp-Source: ABdhPJzKjD4bfxJsZ3MltnBLLxyc2aX4Ufpsg6toOEhpS3n3ocznWqIgXxtMt0n0CgR8c7hiUm3u9GOHKF6XgrKtqEY= X-Received: by 2002:a05:6808:1283:: with SMTP id a3mr306500oiw.57.1643108912208; Tue, 25 Jan 2022 03:08:32 -0800 (PST) MIME-Version: 1.0 References: <20220113172219.66372-1-yaroshchuk2000@gmail.com> <20220113172219.66372-3-yaroshchuk2000@gmail.com> <7053351.4JHWUSIRgT@silver> In-Reply-To: From: Akihiko Odaki Date: Tue, 25 Jan 2022 20:08:21 +0900 Message-ID: Subject: Re: [PATCH v13 2/7] net/vmnet: add vmnet backends to qapi/net To: Peter Maydell Content-Type: text/plain; charset="UTF-8" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::229 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::229; envelope-from=akihiko.odaki@gmail.com; helo=mail-oi1-x229.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , Vladislav Yaroshchuk , phillip.ennen@gmail.com, Jason Wang , Christian Schoenebeck , qemu Developers , Cameron Esfahani , Markus Armbruster , Roman Bolshakov , Alexander Graf , Gerd Hoffmann , Howard Spoelstra , Roman Bolshakov , Alessio Dionisi , =?UTF-8?B?QWxleCBCZW5uw6ll?= , Eric Blake , Phillip Tennen Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, Jan 25, 2022 at 7:32 PM Peter Maydell wrote: > > On Tue, 25 Jan 2022 at 04:14, Akihiko Odaki wrote: > > I'm neutral about the decision. I think QEMU should avoid using > > Objective-C code except for interactions with Apple's APIs, and .c is > > superior in terms of that as it would prevent accidental introduction > > of Objective-C code. On the other hand, naming them .m will allow the > > introduction of Automatic Reference Counting to manage dispatch queue > > objects. In fact, I have found a few memory leaks in vmnet in the last > > review and ui/cocoa.m has a suspicious construction of the object > > management (Particularly it has asynchronous dispatches wrapped with > > NSAutoreleasePool, which does not make sense). > > I think those are probably my fault -- in commit 6e657e64cd (in 2013) > we added NSAutoReleasePools to fix leaks that happened because > we were calling into Cocoa APIs from threads other than the UI > thread that didn't have their own automatically created autorelease > pool. Much later in commit 5588840ff778 (in 2019) we put in the > dispatch_async stuff because newer macOS was stricter about > requiring Cocoa API calls to be only on the UI thread. So > I think that means the requirement for the autorelease pools > has now gone away in those functions and we could simply delete > them -- does that sound right? (I freely admit that I'm not a macOS > expert -- I just look stuff up in the documentation; historically > we haven't really had many expert macOS people around to work on > cocoa.m...) Removing them would be an improvement. Enabling ARC is a long-term solution and would allow clang to analyze object management code and answer such a question semi-automatically. Regards, Akihiko Odaki > > On the subject of cocoa.m, while we have various macOS-interested > people in this thread, can I ask if anybody would like to > review a couple of patches that came in at the beginning of the > year? > > https://patchew.org/QEMU/20220102174153.70043-1-carwynellis@gmail.com/ > ("ui/cocoa: Add option to disable left command and hide cursor on click") > and > https://patchew.org/QEMU/20220103114515.24020-1-carwynellis@gmail.com/ > ("Show/hide the menu bar in fullscreen on mouse") > > either from the point of view of "is this a sensible change to > the macOS UI experience" or for the actual code changes, or both. > > We've been very short on upstream macOS code reviewers so if people > interested in that host platform are able to chip in by > reviewing each others' code that helps a lot. > > thanks > -- PMM