Received: by 2002:a05:6512:e85:0:0:0:0 with SMTP id bi5csp3100166lfb; Tue, 28 Jun 2022 06:31:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vTrJyO5Wme8GFNHlUkW+Fw0AkT80/e4oOCmxXEINUy9juR8nzJo2yOwmRjKf66blJy3s7H X-Received: by 2002:a05:6402:5255:b0:435:bec2:9e33 with SMTP id t21-20020a056402525500b00435bec29e33mr23344554edd.398.1656423071639; Tue, 28 Jun 2022 06:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656423071; cv=none; d=google.com; s=arc-20160816; b=h8AG2E/1mByx5oI7ZnG6s5B9zrUUv+AHI4LvXHmNw8jSGgQiWFBgZGxasRtVhMZco6 f3OJ5BSE/d+CgTYWabX42pTNfs2cAiGVKSGWOHFZH1brW+6Mub9S1xVKTddD53J5L2T4 lADSznPfZley6Ri4sZfkjiIkIgosxJV2UfogHF9bn6bJto5Yb8Lft4d2I8B5qPYg3uky eM4WqLoSCeelmnVqr9TrEXftwsNA+BIO+W5YtUonFi1HDPQFPzFaIia+awxk5/NCgGEF LLx54S/X9+zfINcfAg5GXOiw9zx2XLMZLGiD3FSweiziIcbI2tM6h/godkuP8MENp9KF 1J1Q== 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=stvcWf/Dv/HCswQMb7L/DK4mSy/strvkEs87oQWeirw=; b=WKfyeQIScqcUYU83P0uNjwD0hn6OeCY2joIRjQRBUEIyuHCeYu9bU/fv/QstCmWG/d 6pUTQLAUFikMj78HX8tiZXll+yqu+/IPRNTIKYd/ykIzfH+lL6ooFcHvfY0sK3pVX9Xj a+VfREp6vnbMJS35jGl38ENgBliDl2ICUbtD75yfY3CpGLw/wnCAyMKO0ew1d1+WvN6y YKx4SvQmqr+LXNDC6UzKfF2s1Xg74GBy8LOZVLBBgQ2oiND8j3Dw05lHRLZb1tHKL4mg SfZoAQo8lg95DnUqeYjT9q/v1NUUDUEHwYnsCH2m8u9xbB03kiBeBaEMI5LwdUfDrezx 9Qqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=V6A4i4mg; 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=NONE sp=NONE 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 hr30-20020a1709073f9e00b00711fa454fb3si15434909ejc.889.2022.06.28.06.30.44; Tue, 28 Jun 2022 06:31:11 -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=V6A4i4mg; 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=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345940AbiF1MvI (ORCPT + 99 others); Tue, 28 Jun 2022 08:51:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240685AbiF1MvG (ORCPT ); Tue, 28 Jun 2022 08:51:06 -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 A785E24F1A; Tue, 28 Jun 2022 05:51:04 -0700 (PDT) Received: from [192.168.2.145] (109-252-118-164.nat.spd-mgts.ru [109.252.118.164]) (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 0CAD76601856; Tue, 28 Jun 2022 13:50:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656420662; bh=PFIWuLGIBDtoRI7sScn1Qx1sFNzrxav9CwBcyPc2Png=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=V6A4i4mgC7SygYLCmvg40e3M81RG/nLZ/L09nEF81ZEMMV40VCGpzFid5ug7Tsy+M JJULMGU+7KkybWYvkIsvU/ssgYQavWAgTD+qaLt1ZFZMED89SRhVkbTpf0pkVLfkoR JfMkEqOi6Jltg+VJCW0E6PxrF4y+o0UyiHoHJPm5iOgz2VnonBrpPs33i7rlIkHOWe GbmYQjKXkSUuNfZXIi9JfAnVBSFfMhkr7oZUdkjoY+h8H0UjB5/VbfcY+JTYya+yEV nUgQkyz86IxSI8sX2smo3E9EcgTcZljuRobh25uNSzXJ+0iLsUPXTV8KID1cNF+P49 tf0YoXH3FRlUA== Message-ID: Date: Tue, 28 Jun 2022 15:50:57 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v6 00/22] Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers Content-Language: en-US To: Robin Murphy , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Steven Price , Alyssa Rosenzweig , Rob Clark , Emil Velikov , Qiang Yu , Sumit Semwal , =?UTF-8?Q?Christian_K=c3=b6nig?= , "Pan, Xinhui" , Thierry Reding , Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Alex Deucher , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Dmitry Osipenko , linux-tegra@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, kernel@collabora.com References: <20220526235040.678984-1-dmitry.osipenko@collabora.com> <49cc6f0c-e90e-8edd-52e7-4188620e2c28@arm.com> From: Dmitry Osipenko In-Reply-To: <49cc6f0c-e90e-8edd-52e7-4188620e2c28@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 6/28/22 15:31, Robin Murphy wrote: > ----->8----- > [   68.295951] ====================================================== > [   68.295956] WARNING: possible circular locking dependency detected > [   68.295963] 5.19.0-rc3+ #400 Not tainted > [   68.295972] ------------------------------------------------------ > [   68.295977] cc1/295 is trying to acquire lock: > [   68.295986] ffff000008d7f1a0 > (reservation_ww_class_mutex){+.+.}-{3:3}, at: drm_gem_shmem_free+0x7c/0x198 > [   68.296036] > [   68.296036] but task is already holding lock: > [   68.296041] ffff80000c14b820 (fs_reclaim){+.+.}-{0:0}, at: > __alloc_pages_slowpath.constprop.0+0x4d8/0x1470 > [   68.296080] > [   68.296080] which lock already depends on the new lock. > [   68.296080] > [   68.296085] > [   68.296085] the existing dependency chain (in reverse order) is: > [   68.296090] > [   68.296090] -> #1 (fs_reclaim){+.+.}-{0:0}: > [   68.296111]        fs_reclaim_acquire+0xb8/0x150 > [   68.296130]        dma_resv_lockdep+0x298/0x3fc > [   68.296148]        do_one_initcall+0xe4/0x5f8 > [   68.296163]        kernel_init_freeable+0x414/0x49c > [   68.296180]        kernel_init+0x2c/0x148 > [   68.296195]        ret_from_fork+0x10/0x20 > [   68.296207] > [   68.296207] -> #0 (reservation_ww_class_mutex){+.+.}-{3:3}: > [   68.296229]        __lock_acquire+0x1724/0x2398 > [   68.296246]        lock_acquire+0x218/0x5b0 > [   68.296260]        __ww_mutex_lock.constprop.0+0x158/0x2378 > [   68.296277]        ww_mutex_lock+0x7c/0x4d8 > [   68.296291]        drm_gem_shmem_free+0x7c/0x198 > [   68.296304]        panfrost_gem_free_object+0x118/0x138 > [   68.296318]        drm_gem_object_free+0x40/0x68 > [   68.296334]        drm_gem_shmem_shrinker_run_objects_scan+0x42c/0x5b8 > [   68.296352]        drm_gem_shmem_shrinker_scan_objects+0xa4/0x170 > [   68.296368]        do_shrink_slab+0x220/0x808 > [   68.296381]        shrink_slab+0x11c/0x408 > [   68.296392]        shrink_node+0x6ac/0xb90 > [   68.296403]        do_try_to_free_pages+0x1dc/0x8d0 > [   68.296416]        try_to_free_pages+0x1ec/0x5b0 > [   68.296429]        __alloc_pages_slowpath.constprop.0+0x528/0x1470 > [   68.296444]        __alloc_pages+0x4e0/0x5b8 > [   68.296455]        __folio_alloc+0x24/0x60 > [   68.296467]        vma_alloc_folio+0xb8/0x2f8 > [   68.296483]        alloc_zeroed_user_highpage_movable+0x58/0x68 > [   68.296498]        __handle_mm_fault+0x918/0x12a8 > [   68.296513]        handle_mm_fault+0x130/0x300 > [   68.296527]        do_page_fault+0x1d0/0x568 > [   68.296539]        do_translation_fault+0xa0/0xb8 > [   68.296551]        do_mem_abort+0x68/0xf8 > [   68.296562]        el0_da+0x74/0x100 > [   68.296572]        el0t_64_sync_handler+0x68/0xc0 > [   68.296585]        el0t_64_sync+0x18c/0x190 > [   68.296596] > [   68.296596] other info that might help us debug this: > [   68.296596] > [   68.296601]  Possible unsafe locking scenario: > [   68.296601] > [   68.296604]        CPU0                    CPU1 > [   68.296608]        ----                    ---- > [   68.296612]   lock(fs_reclaim); > [   68.296622] lock(reservation_ww_class_mutex); > [   68.296633]                                lock(fs_reclaim); > [   68.296644]   lock(reservation_ww_class_mutex); > [   68.296654] > [   68.296654]  *** DEADLOCK *** This splat could be ignored for now. I'm aware about it, although haven't looked closely at how to fix it since it's a kind of a lockdep misreporting. -- Best regards, Dmitry