Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp79514lqs; Mon, 4 Mar 2024 15:56:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUhH6DXyag5DXFnus7Ooz2Des/ncLsZCRgzt8If9igCR6xnGu0zxAw7jL6iJJXFjrwUYeyXgIC5oquF30AdaRLld6PfNiDOgDCNP0177w== X-Google-Smtp-Source: AGHT+IGUXSLG4GA7uvrp5UxXOzJgyIN7oBr8K2FxsB7DN+G1TkTEgu1b5TveqfP2AufFxIhPStc8 X-Received: by 2002:a05:620a:208e:b0:788:31b8:9a4e with SMTP id e14-20020a05620a208e00b0078831b89a4emr325524qka.44.1709596612632; Mon, 04 Mar 2024 15:56:52 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id br42-20020a05620a462a00b007882ed2379bsi2349950qkb.294.2024.03.04.15.56.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 15:56:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PTkY9xDH; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-91428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91428-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5143F1C21839 for ; Mon, 4 Mar 2024 23:56:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E90CA7D3F0; Mon, 4 Mar 2024 23:56:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PTkY9xDH" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D59A7D07C for ; Mon, 4 Mar 2024 23:56:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.14 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709596605; cv=fail; b=FUdcrXC2WZbjiHegOwOTC5PINmB3bksp/hsS+9rmGXyD5lN4XfnYKZ8BZ/As1zECHn1EHsgmO3XXA6/JEhmtAlPxAKwsHmF7jOwOdmXCyy64ud0uzfiHCnV/ZH3TCU4jHYdyWxZKJ0ViXfq4GuYO9+IF2lIiN0dG6buSCqNwJzU= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709596605; c=relaxed/simple; bh=UETm9foHgSCfa7FwVcHS5dd+PI6FudNX2EEnmvT7+h4=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=tBUCTygW4lcClp4tVAgYMZg3Yqam/5Kz3Mu20aVFtvjTtWrJccIrCNy4w+YrKEzdZvC9BwS1KYW14yxAbMsSfcRM3rendYkPak8fDjTHsyUG66WrgWAjnTaOa0Z2ZKP5v6KDvIfWcVV9xvp1Ibg/yH6Z3kyGObrfOIKVjDnmdM0= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=PTkY9xDH; arc=fail smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709596603; x=1741132603; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=UETm9foHgSCfa7FwVcHS5dd+PI6FudNX2EEnmvT7+h4=; b=PTkY9xDHV/L4xeieogrkHooy/YV2nFoGETEZC7lnk5TsGcPGeTz0nOJx XRC5jv0tZX0b6zXZB5k5R1UAl3X461u7nrkcv5UtV6+VCjjLRMHVRb9CY 8hYliXGiTbwoPq5tXZbdczZHfMkybw2RcTboEZijo+tbO5UaK5Xc2a2Fh JRoDPwj3Ne4yn6b8sAG1vkG00FYOd8jXQWp/xHdF2/OUMHFF2qewlzT4J oJTeMligi1J3msz4R+Izn75Lq/b3YK3USyPikpsK1VWiwOKOZrlruobgf zcCWNwRzFu6cwJIU2y8sJ+DlqMcYDocCcN3IfqPZPTpKoBHmrA4Sg/w2R A==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="7940942" X-IronPort-AV: E=Sophos;i="6.06,204,1705392000"; d="scan'208";a="7940942" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 15:56:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,204,1705392000"; d="scan'208";a="9759085" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 04 Mar 2024 15:56:04 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 4 Mar 2024 15:56:01 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 4 Mar 2024 15:55:59 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 4 Mar 2024 15:55:59 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 4 Mar 2024 15:55:50 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IHlvfeA9QLRqGWdLFYTqJqpkXjAnN3a7AUe7X8+wMWgMQ7f92NTGA/r2kWP68QJkv6b9dTMhfZoyUXWfvJbW37sXycnAzjThxrgS+xRvkcbYGSSrrN9qw1uJuhDyjqOdgVzB9kQJUIhW9+ir5m0M6Ljp5Vikm1BCRsMoGMAZMnBrWjj9XnuH3b83bl6rD7c78Wjgd4cKH6cp6+HYbsh+UkiHDOPNYFI4KCCtJAjQpXNI1qcBQdpcy2WMnvZ4G/wXtrMkhICLJr5XdoCPmJZHQ/5sY57RDCoVfV/JsphtXZ8vEFC3iZL8YihsgMlXlK3mTDI8NrzzEgTlYljF/YWksg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RC6pT3h0WxMt4fsJeM+q7ABlU09PnqbSrKUZpv6QxEc=; b=KSXeZ9hJc/7iWkUr+LrFun25zKnMmTUD6XgeaL5FBvfDgM1RGoMyMhUIZ5ebFACbYW0PSZVbfUk+AG4lxYfzqWF8wHClZ5Bex+RU3JC0kogQm5/O9+EHxTlEvsZZdB27UrNCRLAqKcOCJEF/0kzR+S5ET/uyfHoL9A9Ujf0atkxh2qqyX9Xe6Jp7496SF51t/vbzWSBmu83yINuNH+g/d/T7pEWTfB/qd3MitFOlbn64d6i/vU3Fl7tPibkv5WxzU8SF/uDVz1RQH4DbG7RE2nJU4kgN4ajDW8P3lxOnImy4mYQZXcWm8U9z6S3m3IUwGAITT/OPlnSRx4MQfG8uDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) by LV3PR11MB8507.namprd11.prod.outlook.com (2603:10b6:408:1b0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.22; Mon, 4 Mar 2024 23:55:48 +0000 Received: from CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::e9dd:320:976f:e257]) by CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::e9dd:320:976f:e257%4]) with mapi id 15.20.7362.019; Mon, 4 Mar 2024 23:55:48 +0000 Date: Mon, 4 Mar 2024 17:55:45 -0600 From: Lucas De Marchi To: "Souza, Jose" CC: "intel-xe@lists.freedesktop.org" , "johannes@sipsolutions.net" , "linux-kernel@vger.kernel.org" , "Vivi, Rodrigo" , "quic_mojha@quicinc.com" , "Cavitt, Jonathan" Subject: Re: [PATCH v2 2/4] devcoredump: Add dev_coredumpm_timeout() Message-ID: References: <20240228165709.82089-1-jose.souza@intel.com> <20240228165709.82089-2-jose.souza@intel.com> <84e4f0d70c5552dd7fa350c61c28de9637628ee6.camel@sipsolutions.net> <0f4244ea6866f451f3f8a5b5e2db8be53de1f0c2.camel@sipsolutions.net> Content-Type: text/plain; charset="us-ascii"; format=flowed Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: SJ0PR03CA0212.namprd03.prod.outlook.com (2603:10b6:a03:39f::7) To CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY5PR11MB6139:EE_|LV3PR11MB8507:EE_ X-MS-Office365-Filtering-Correlation-Id: 926eff3e-a756-4c13-1fc1-08dc3ca69d1d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7Q/kyOpUqRdz4CT9/bPRNVVxS64/96R/4recu/u2zr/idy6Ch2CuMBg32DQxyNb0qtDC6fH3OUEZ2JJzsPGvD2daE+weF3z11e5a3IbQQKMTegr6vjv01dIgzo9yKqyUPfL4aMBX7wLWt2EM1ZbdXQuOgfnFOixDsPj5V1Pps8MEWtUs9Q56FS36OjQb5D/wSYGO8rFWmiDBqhz13a4CjCJKIvxMK5eFnHhiS8Y58kgNg96JLD2x1MezmkujaUPIgfyKSnIRg8Z77wE2M4jxt+WAqNzJAtbWYW2P4IS5nOx4OzshC42I1Y5QGvrIPqWhKbGMSYWhA3+4RB8xBKTr5KB//2YqlLQJt/yz1X1Yag6ciKjAY+0+/5qv1A7QJZBintyie1imNR0Ao2k5dNQz3SEdwnoyGs4hpesX9akMa9mg+yUHuYiF8dgOl0u4ux01h/QZ+PHwlzTMsZTn88TIX+yUHZ45yE2yzOptnFafstxiBosylugChMb72i5tc9AgwE9FoFEd+i4JBglwmvH5rJlh9mMnZ1Q15OEVOKW/tVpgmaMnVHOc8CV/d7ni2CZXvvCYLuYcYhxN4ewyGB1quQQM+uQOqiXEu5i9toum190= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY5PR11MB6139.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?uJ5ZEw5fEgE3n9DJ1DGAEuyOT1MEBIZUK85pHLK0oGoSf9Lwwl2Ntff0gC1+?= =?us-ascii?Q?oRQLay8t3a8+0sb1FvoinBR8KxMpWfJQG9HK4QB8QVGFLbXus06wYzozz1ba?= =?us-ascii?Q?lFSg88dODnrbWQpbas7/jEKtF+t85UgqVjn0IFB3hT9d4y2nn62RzBS515dW?= =?us-ascii?Q?w2BcAQHKQW+VuAIBQYRb9sgid5U6+e4uNC+cE7qWPaoAlv1YFCvSgCoEBdmc?= =?us-ascii?Q?9UZc4YOHcwatUnGvDZsbzzNJzDntPy92+r45TRzQkDCC4fKlxwGDhXmDD2zQ?= =?us-ascii?Q?+rU6CZvFqFLgKrLXX1ZdzhyBZtm7+iVR34nw2sBBIEsV5zk+oYBF7hdM80d7?= =?us-ascii?Q?MFcDc2aXfV6SS0ulgy0lIFblfnlX85m/uXJZhtN/BMVwZ0Q4db+j0yo22++n?= =?us-ascii?Q?QqNHxTmlASN/79WXiOMogdDWW5VY/3Nch2InO3E7r1/T+UskatdQ5C5NH0zA?= =?us-ascii?Q?n1RVz24u4TXG0Yst1e/W3vexkXkQzXl2Hmg90dOAqsMUfjegtX+P6kEnSBJQ?= =?us-ascii?Q?25SVXc2TnTqVE1I8srcQbIg8+4qLdgeyz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Q?ZmBj7RJe70Ff0vlWMwxal2HZ1yw+LWj6eV2OKUiUIdLESR9KhrFuSQjnLXc/?= =?us-ascii?Q?yfHSDFUrlZY6mUDdXPCqkWrAz26u2aIKFMUiEZzdV80sZLzgURGemQrVc+Xy?= =?us-ascii?Q?fbUGHT9IrBVaNFjcPq573vM/aJhCreBytWep7B+o5UtidgEW+b6sorAhtbe7?= =?us-ascii?Q?sg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 926eff3e-a756-4c13-1fc1-08dc3ca69d1d X-MS-Exchange-CrossTenant-AuthSource: CY5PR11MB6139.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 23:55:48.0153 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: slSz0UACcR16zo6XtHPEhNMuZ1e44Q+A27rBMHdwFGrG3JCBLWHjAoDajGRra/H7W+HoF78cwniQeqxrl3vj4irh/zlauuF9A88uBOwgMSw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR11MB8507 X-OriginatorOrg: intel.com On Mon, Mar 04, 2024 at 02:29:03PM +0000, Jose Souza wrote: >On Fri, 2024-03-01 at 09:38 +0100, Johannes Berg wrote: >> > On Wed, 2024-02-28 at 17:56 +0000, Souza, Jose wrote: >> > > > >> > > > In my opinion, the timeout should depend on the type of device driver. >> > > > >> > > > In the case of server-class Ethernet cards, where corporate users automate most tasks, five minutes might even be considered excessive. >> > > > >> > > > For our case, GPUs, users might experience minor glitches and only search for what happened after finishing their current task (writing an email, >> > > > ending a gaming match, watching a YouTube video, etc.). >> > > > If they land on https://drm.pages.freedesktop.org/intel-docs/how-to-file-i915-bugs.html or the future Xe version of that page, following the >> > > > instructions alone may take inexperienced Linux users more than five minutes. >> > >> > That's all not wrong, but I don't see why you wouldn't automate this >> > even on end user machines? I feel you're boxing the problem in by >> > wanting to solve it entirely in the kernel? > >The other part of the stack that we provide are the libraries implementing Vulkan and OpenGL APIs, I don't think we could ship scripts that needs >elevated privileges to read and store coredump. it's still a very valid point though. Why are we doing this only on kernel side or mesa side rather than doing it in the proper place? As Johannes said, this could very well be automated via udev rules. Distros automate getting the coredump already with systemd-coredump and the like. Why wouldn't we do it similarly for GPU? Handling this at the proper place you leave the policy there for "how long to retain the log", "maximum size", "rotation", etc.... outside of the kernel. For the purposes of reporting a bug, wouldn't it be better to instruct users to get the log that was saved to disk so they don't risk losing it? I view the timeout more as a "protection" from the kernel side to not waste memory if the complete stack is not in place. It shoudln't be viewed as a timeout for how long the *user* will take to get the log and create bug reports. Lucas De Marchi > >> > >> > > > I have set the timeout to one hour in the Xe driver, but this could increase if we start receiving user complaints. >> > >> > At an hour now, people will probably start arguing that "indefinitely" >> > is about right? But at that point you're probably back to persisting >> > them on disk anyway? Or maybe glitches happen during logout/shutdown ... > >i915 driver don't use coredump and it persist the error dump in memory until user frees it or reboot it and we got no complains. > >> > >> > Anyway, I don't want to block this because I just don't care enough >> > about how you do things, but I think the kernel is the wrong place to >> > solve this problem... The intent here was to give some userspace time to >> > grab it (and yes for that 5 minutes is already way too long), not the >> > users. That's also part of the reason we only hold on to a single >> > instance, since I didn't want it to keep consuming more and more memory >> > for it if happens repeatedly. >> > > >okay so will move forward with other version applying your suggestion to make dev_coredumpm() static inline and move to the header. > >thank you for the feedback > >> > johannes >