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 32F74C433FE for ; Sat, 12 Feb 2022 08:25:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232596AbiBLIZG (ORCPT ); Sat, 12 Feb 2022 03:25:06 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232503AbiBLIZF (ORCPT ); Sat, 12 Feb 2022 03:25:05 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F327A26AF7; Sat, 12 Feb 2022 00:25:00 -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=XH4dFPiX5OoR9zNtWoY972SsBoh28piIfTnd7x3AM1k=; t=1644654301; x=1645863901; b=HYni9O7Hy3Lw5qzwfs73wAMPDmivexdxVh6sGzB+zK7Xa3+ RMMU0RNoLuxOedO3+7LddFgz7UdDUiUT2vSHvOg5UJAOZr5e04AU6YaG8EjNTx/7A7iHE+UJj8Z+R tPypTHS7XzHdLLxUAjU3qJLKoPtlTKUq1D+/kaY6zV4JBHVB7IBlVanLsbo0rUYII9uFzDkvoHbHJ lRyEtzjNJy/Qytabx2/LOptoBjHXf0G8Ez83LHeAcas+CIgC3FdfW6EfSR/iPyGGcnvOFa1ImpaiG F36E/GMPxmMRAUPJgvz/C9emBQ64eLmGDEQC0/v92yOvkuJsYVmQnw4I9DLPikOw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nIni7-000C5h-6u; Sat, 12 Feb 2022 09:24:51 +0100 Message-ID: <7db7d01fcf5a3edce61161769c0e6eb1541237bf.camel@sipsolutions.net> Subject: Re: [PATCH] devcoredump: increase the device delete timeout to 10 mins From: Johannes Berg To: Abhinav Kumar , Greg KH Cc: linux-kernel@vger.kernel.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: Sat, 12 Feb 2022 09:24:50 +0100 In-Reply-To: References: <1644349472-31077-1-git-send-email-quic_abhinavk@quicinc.com> <654d620b-9e14-c47f-b48c-762dc0bd32a1@quicinc.com> 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 Fri, 2022-02-11 at 23:52 -0800, Abhinav Kumar wrote: > > The thread is writing the data to a file in local storage. From our > profiling, the read is the one taking the time not the write. > That seems kind of hard to believe, let's say it's a 4/3 split (4 minutes reading, 3 minutes writing, to make read > write as you say), and 3MiB size, that'd mean you get 12.8KiB/sec? That seems implausibly low, unless you're reading with really tiny buffers? Can you strace this somehow? (with timestamp info) > Just doubling what we have currently. I am not sure how the current 5 > mins timeout came from. > To be honest it came out of thin air, and wasn't really meant as a limit on how fast you can read (feels like even if it's tens of MiB you should read it in milliseconds into userspace), but more of a maximum time that we're willing to waste kernel memory if nobody is around to read the data. I thought it'd be better if we could somehow pin it while the userspace is reading it, but OTOH maybe that's actually bad, since that means userspace (though suitably privileged) could pin this kernel memory indefinitely. 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 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 DC756C433EF for ; Sat, 12 Feb 2022 08:25:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C368410E2B9; Sat, 12 Feb 2022 08:25:01 +0000 (UTC) Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by gabe.freedesktop.org (Postfix) with ESMTPS id B74AA10E2B9; Sat, 12 Feb 2022 08:25:00 +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=XH4dFPiX5OoR9zNtWoY972SsBoh28piIfTnd7x3AM1k=; t=1644654300; x=1645863900; b=XQO9V+sBo1jSQSEEGvEx0PErYLBuB5MO7473fWkmhHs7EP9 JPRLMlbcgi4WS7kgnwtH6cpxH96hHZNEcnPvjSvwn1Qzp0KuYmVN8/tQqWM10jQ/ENbz4Bb0sSmw+ 0udyP8L0c4pSHL61TkqMohUq9GE01WXMT5xHPA+FQyPgaIcatM8IWOnakub/MQ4sY9bw6C2PhckMx KPy3VLsrJ0nJvG8V3lcOV0yE2+I7A6babKcA2ACeLV4SYcjMM9vysPOUew9MKvdKd0Id7tHVpWN8f vbzkCniojVD9Gr1+8R0chYk1Dvl2gpb9PgMbUkwRrxqEomPY8R+LRRi6zyHJifJA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nIni7-000C5h-6u; Sat, 12 Feb 2022 09:24:51 +0100 Message-ID: <7db7d01fcf5a3edce61161769c0e6eb1541237bf.camel@sipsolutions.net> Subject: Re: [PATCH] devcoredump: increase the device delete timeout to 10 mins From: Johannes Berg To: Abhinav Kumar , Greg KH Date: Sat, 12 Feb 2022 09:24:50 +0100 In-Reply-To: References: <1644349472-31077-1-git-send-email-quic_abhinavk@quicinc.com> <654d620b-9e14-c47f-b48c-762dc0bd32a1@quicinc.com> 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, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, swboyd@chromium.org, khsieh@codeaurora.org, nganji@codeaurora.org, seanpaul@chromium.org, dmitry.baryshkov@linaro.org, aravindh@codeaurora.org, freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, 2022-02-11 at 23:52 -0800, Abhinav Kumar wrote: > > The thread is writing the data to a file in local storage. From our > profiling, the read is the one taking the time not the write. > That seems kind of hard to believe, let's say it's a 4/3 split (4 minutes reading, 3 minutes writing, to make read > write as you say), and 3MiB size, that'd mean you get 12.8KiB/sec? That seems implausibly low, unless you're reading with really tiny buffers? Can you strace this somehow? (with timestamp info) > Just doubling what we have currently. I am not sure how the current 5 > mins timeout came from. > To be honest it came out of thin air, and wasn't really meant as a limit on how fast you can read (feels like even if it's tens of MiB you should read it in milliseconds into userspace), but more of a maximum time that we're willing to waste kernel memory if nobody is around to read the data. I thought it'd be better if we could somehow pin it while the userspace is reading it, but OTOH maybe that's actually bad, since that means userspace (though suitably privileged) could pin this kernel memory indefinitely. johannes