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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 8E95DC433F5 for ; Tue, 8 Feb 2022 21:12:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DE6310E4A1; Tue, 8 Feb 2022 21:12:49 +0000 (UTC) Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by gabe.freedesktop.org (Postfix) with ESMTPS id 646BC10E4A1; Tue, 8 Feb 2022 21:12:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Ka1YRMzeVRg7rN1gJ2YpEkVn/wWTU+NPmgwt1bGNWtA=; t=1644354768; x=1645564368; b=SZ7Tcfpq7yYxcF8TZzgdG5YU795suz0G38P1OSKPzsTGuox vtcuhU8AEiJaPFEedkUD3l5uvpDBbp7ZRad3tPJ1AWss5WW0m3vR52cL0TW18iYXX79wcjECTeXnS wM7suTDBtoiEsKUz1Ozn0mbbZfCq3p+JmKWbeby+/7nlLDgYX4cShfEuvUOROBgF2mjkJocJmj7R0 rTHR0rJso8ytegFHRCRVdOOL+lWpvQOI7h0rfsZrLL27SvuNuEzWmbGov+zd8fHJ8lE/aZlQbfq9B ofUu2+JIWk9H85Xyfz3iUtjZM35FbYp3cg3mvZFXtyfLcPCdKxiH6/NBKBFnx5tQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nHXn0-00GCMS-QC; Tue, 08 Feb 2022 22:12:42 +0100 Message-ID: Subject: Re: [PATCH] devcoredump: increase the device delete timeout to 10 mins From: Johannes Berg To: Abhinav Kumar , linux-kernel@vger.kernel.org Date: Tue, 08 Feb 2022 22:12:41 +0100 In-Reply-To: References: <1644349472-31077-1-git-send-email-quic_abhinavk@quicinc.com> <8d67484c7e4b9fb4560d2eca1f71c75fde8bae0d.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.3 (3.42.3-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafael@kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, swboyd@chromium.org, khsieh@codeaurora.org, nganji@codeaurora.org, seanpaul@chromium.org, gregkh@linuxfoundation.org, dmitry.baryshkov@linaro.org, aravindh@codeaurora.org, freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, 2022-02-08 at 13:04 -0800, Abhinav Kumar wrote: > > It opened the file rightaway but could not finish reading. > > The device gets deleted so the corresponding /data will disappear too ( > as the data node is under devcd*/data) Yeah but even if the file disappears, the open file descriptor is still there, no? Does sysfs somehow make those disappear? I know debugfs does (now, to some extent, it didn't always), but I thought sysfs was refcounting things and didn't do that? What did the userspace actually see? read() returned 0 so EOF? (I guess I could test it, but it's getting late) Your other questions are related - you need to consider the file in sysfs and the open file descriptor separately. johannes 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7B36C433EF for ; Tue, 8 Feb 2022 22:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236187AbiBHWWV (ORCPT ); Tue, 8 Feb 2022 17:22:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386790AbiBHVMs (ORCPT ); Tue, 8 Feb 2022 16:12:48 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D2DBC0612B8; Tue, 8 Feb 2022 13:12:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Ka1YRMzeVRg7rN1gJ2YpEkVn/wWTU+NPmgwt1bGNWtA=; t=1644354767; x=1645564367; b=T014nE4znWd8E+7itKVL1L9j11EYA5ju4k9PZHKGcJbbnBX f+NzZiLQoVCXf8J1jNGvww8NY0QcpH08RsMC+a4h/ldendjRCJc6XHCtUtv61el7duutRP6or/VdU yNj8aAQBM9Z7qyazCivippi7HC3r87VYwrvfrgjEg7p68Xn7YiI1ZImJj3426Dp0GAc4WFyihr1cL lEa1qTMnYbjl1X7qlYJpYHwzEeQ12c1dHP+vnnDORyr/2+j1gMiVqQCcjy34Y05tTumPkv9P5NPV4 pvlfUHLPaLdY4fVJSvnq6Ih44zHQgUDG61R5Mv2h0QZYzQgDUqYRQjwwp0AlMJJg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nHXn0-00GCMS-QC; Tue, 08 Feb 2022 22:12:42 +0100 Message-ID: Subject: Re: [PATCH] devcoredump: increase the device delete timeout to 10 mins From: Johannes Berg To: Abhinav Kumar , linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, robdclark@gmail.com, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, seanpaul@chromium.org, swboyd@chromium.org, nganji@codeaurora.org, aravindh@codeaurora.org, khsieh@codeaurora.org, daniel@ffwll.ch, dmitry.baryshkov@linaro.org Date: Tue, 08 Feb 2022 22:12:41 +0100 In-Reply-To: References: <1644349472-31077-1-git-send-email-quic_abhinavk@quicinc.com> <8d67484c7e4b9fb4560d2eca1f71c75fde8bae0d.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.3 (3.42.3-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, 2022-02-08 at 13:04 -0800, Abhinav Kumar wrote: > > It opened the file rightaway but could not finish reading. > > The device gets deleted so the corresponding /data will disappear too ( > as the data node is under devcd*/data) Yeah but even if the file disappears, the open file descriptor is still there, no? Does sysfs somehow make those disappear? I know debugfs does (now, to some extent, it didn't always), but I thought sysfs was refcounting things and didn't do that? What did the userspace actually see? read() returned 0 so EOF? (I guess I could test it, but it's getting late) Your other questions are related - you need to consider the file in sysfs and the open file descriptor separately. johannes