Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp199682rwl; Thu, 23 Mar 2023 14:54:49 -0700 (PDT) X-Google-Smtp-Source: AKy350bxZ6yxhSi4/bQVM0q8/o4iAx3b6ab/H/kzBMgYiPNlzrr9Zq+foZlI9TQW0RCVGTSUDg0r X-Received: by 2002:a05:6402:4c3:b0:4fb:fd9f:737a with SMTP id n3-20020a05640204c300b004fbfd9f737amr982280edw.4.1679608489491; Thu, 23 Mar 2023 14:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679608489; cv=none; d=google.com; s=arc-20160816; b=dX3a/Ew9qtaRmt8ZxajHz9uu0WKPc7fx0/iTqPcPIere7cmTzwbVINMaRUnMJZ/7eW 2a7vstoGRbwUWrPqSf+qor0AozvLBXzZWXs8D7944SJB7FsWGW4ju2v3NroPwHeSJ2uU QIxkhk/zzZ57AYGtVguTNVvIQYR/HAT6eh46aS1k9gNPH4mX4HFN5cC/1yqQvqu2Qdf8 stJvu03st9H7Xsoh57UPWmIwfmDoQn9prTXFlBr1KyIdqzEVha546UUY26Y+fG6ahZKv SGoq/qC122lL0RfA7IRWDG2q/HPSBGUcf02iaxK+aMEoS/JEL1zeKeUYZGvcJXYpxt2v 7WLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SJN+kdtJsV4+tdXM2OFkuCNeih6dCNNuf7p0oBrnrbY=; b=1FAWl7Ls9XV/QAQT8PYcDZaKts1kvGmhqwFNfxuKesCr+ACVenBBqq8qDREE+kXekR K06tqGjYAu0L6EikTK+3HKXVZMI2wjxpGHug5kBFvDWlGzJFyDxL6CCMgBhSCAsxjfmd 4cDPVzQlWc2HsFwpzLGRNApVFhNCdsfjFzyn10wSqPnzW9AQvVEyXzpTbfyg+GwVP1vh OXOykLsyqXc/XAzLOq8aBd0W625AoiKL48HCfLC98hMqhMP8esKgH2UdPAZy9CSZv4YS Nc7YpM8EYFc1DfPE9Cjh2SnmN/lI2F2MsdPP+GABJvQOqOVU74jAB/W0hW8mipEyi0mU qoEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fWIuQwX9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d24-20020aa7d698000000b004c056644702si20148060edr.400.2023.03.23.14.54.25; Thu, 23 Mar 2023 14:54:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fWIuQwX9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231206AbjCWVvV (ORCPT + 99 others); Thu, 23 Mar 2023 17:51:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbjCWVvS (ORCPT ); Thu, 23 Mar 2023 17:51:18 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCE83DBCD for ; Thu, 23 Mar 2023 14:51:16 -0700 (PDT) Received: from [192.168.2.179] (109-252-120-116.nat.spd-mgts.ru [109.252.120.116]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1243A66030B1; Thu, 23 Mar 2023 21:51:14 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679608275; bh=b8kgyZYn0+5wGH8/LCBfM9kyFAXVQpMqVED5+wPW9CQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=fWIuQwX9urinVdbUvAwcg0zofIMiD7XlbRBeNxRMCvakolUH4qO++YG34uOpM+WNL k58ExVkJAkAGqAhhRRFRKN1YvOhZXwqXSGScQPCl2/bVNFZqGks7kNqL6vpOgaTOlp HF5NxrBJk3sqJVaVC+PpEf74rtXfr1kn2z1JxgZ/f4b/qQzaO+RontkhZ5jldNN8Bd kcFWM39am37dLTRsc6HwL2bkoa5c7SMEVa0I5gNFpQ4E9vXGfrPZcvyriD6NESvhyx w3KMoxZ8r4kThsLiX8bQRQ+JW1mBzvZA/qS4B+N5hDxis6JH9ehItXJJr6+IqFqLdD uMU8vNZ4rrOMA== Message-ID: <889ce0e7-f61a-ed0a-35d5-1a9290521d49@collabora.com> Date: Fri, 24 Mar 2023 00:51:11 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v3 2/2] drm/virtio: Support sync objects Content-Language: en-US To: Rob Clark Cc: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , =?UTF-8?B?TWFyZWsgT2zFocOhaw==?= , Pierre-Eric Pelloux-Prayer , Emil Velikov , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org References: <20230323190340.950875-1-dmitry.osipenko@collabora.com> <20230323190340.950875-3-dmitry.osipenko@collabora.com> From: Dmitry Osipenko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/24/23 00:18, Rob Clark wrote: ... >> +static int >> +virtio_gpu_parse_deps(struct virtio_gpu_submit *submit) >> +{ >> + struct drm_virtgpu_execbuffer *exbuf = submit->exbuf; >> + struct drm_virtgpu_execbuffer_syncobj syncobj_desc; >> + size_t syncobj_stride = exbuf->syncobj_stride; >> + struct drm_syncobj **syncobjs; >> + int ret = 0, i; >> + >> + if (!submit->num_in_syncobjs) >> + return 0; >> + >> + syncobjs = kcalloc(submit->num_in_syncobjs, sizeof(*syncobjs), >> + GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY); > I *think*, assuming I'm reading where this is called correctly (kinda > wish git would show more lines of context by default) that these don't > need to be NOWARN|NORETRY (same for post_deps). I guess you inherited > this from drm/msm, where I appear to have forgotten to update the > syncobj path in commit f0de40a131d9 ("drm/msm: Reorder lock vs submit > alloc"). I don't see anything obvious that would require NORETRY, but > lockdep should be able to tell you otherwise if needed. The NORETRY should prevent waking up OOM killer, it shouldn't help with lockdep. Nothing prevents userspace from giving a big number of num_in_syncobjs. But perhaps indeed not very practical to care about this case, given that other similar memalloc paces of execbuffer_ioctl() aren't using NORETRY. Alright, let's drop it in v4. -- Best regards, Dmitry