Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp350518rdb; Thu, 1 Feb 2024 10:10:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnLe1EVdHVjCPCIRcLgZQn0buYZ1zFpxMsBj2ox2m57gKbJDpUHDXvfEtg5buA2ytCfrwi X-Received: by 2002:a17:906:ac5:b0:a35:70d8:89e9 with SMTP id z5-20020a1709060ac500b00a3570d889e9mr4177566ejf.63.1706811021985; Thu, 01 Feb 2024 10:10:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706811021; cv=pass; d=google.com; s=arc-20160816; b=TNahhEgvr8dK/C2OZ0xHaXfibkNIxJOohYP4sj7IXAZRLdGC2Tv2C7JrMRtv6B6JLH tp5yAyHx2sKPzv9ACsqlMiobhhZZOPMFzh22CG6woDg+NX2naS0+9Q5YgNtqBd9F3cVb i7B7l/S4v9q60ocbxFUV0sDAPJerBQL1+mWDyMZTv/W/HrneSfFSMpVOXrBcvX3Ioj+S WWUvAmVX+gCn//5pafsHe6DGi9VVhQQYSXsDc3Vq1bv+F8HGgcKrU999Z4hiKwLJCCA8 708V8RGggv7sMKoRvuYgCXNzHJFiTTR3J89YhWGUqF36cBtC9MxJpYhJF6p+x/yrINbo hQ2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fL/INbrbnVWz32Xshew2LE9qTuB012Kx3NT+3U8ZGYU=; fh=cZBK0UaU3GjSxnIeohvlfggvWtwgq7BOH2UYZ+vVfjM=; b=EkCYmk7p4byE8e8dXWD98VN1NU/DHBe5jXXBP4+qgpNTaaURGMEX/Fcx1/iPwuc1Bc RwjN1F4Htxl1kNeBU2GM9MaBwfS1OQLrsdXFLip3I+DhTYBA5MQkQZIPml9uqc49CH/2 xkgWonmTND2WXSFaH0e4KF5z0GgO/ZVOQQmUUdTGL8J5b37FzcWP5GECdP8bxtVI9hk0 EOcXLPUMwAkFBDhj5pwO4Yvk5q341n9n/8GlAJdrCRXTSi6LXsW6Z2InsAHWLOtr17Lv 0j/b+M31JTxmyc1vbk7I9XVKKKw5GxRrKyZy0yT6whbQcktG+C2f8RCwabIsOoaLBs+3 1aGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yW9h8rcu; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-48659-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48659-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org X-Forwarded-Encrypted: i=1; AJvYcCV6SBDBwHAugULhAq+OxQO9bxAKYB9yV7Oloxj/++w5HC5S1t6ZLDqJu9tLWyO7tl+MDUt013SQtJNV3JyBcb3WEAfhnDAyvdOpbSrZzw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gr22-20020a170906e2d600b00a368cb76c6fsi29868ejb.473.2024.02.01.10.10.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 10:10:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48659-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yW9h8rcu; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-48659-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48659-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id A7BB21F2BE0C for ; Thu, 1 Feb 2024 18:10:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35F8C12B14D; Thu, 1 Feb 2024 18:06:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yW9h8rcu" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 228F08527A; Thu, 1 Feb 2024 18:06:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706810761; cv=none; b=QEkfayjoIIUEll3NLni0qyjGlZcJCBWq7rYXLe8//wIKssLxpx5BxcN03amxI3i/pMMw/mEHmkBwPUApUYcWiztMKkeYk2qTFXE/3wSU9smpsls/Y3x4orVnSQLuL6LO6QEmReLIr7pvpbKLRjmaU2cPRxOROzGa8p2KciIDUcU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706810761; c=relaxed/simple; bh=fkeFsHgWwEit3Sw9Uz4fXI9/KvhF8HPRnkCbIJwN+E4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iIQwuB55RC+cUsmPmLicAFsdWz+EfakQVLeXFXkCOUg1RgzcsIwMP+EXkT66hOYxe08jTO0KjQD40r1+fg3Ee1T6orM3dGtf+Fx15FMV+Iopa1JrLP2acopedvkW8gqTi8lUT9FK7ePnUhSPnPUeY16g/zERstej0K51s9SpW9g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yW9h8rcu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0A3FC433F1; Thu, 1 Feb 2024 18:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706810760; bh=fkeFsHgWwEit3Sw9Uz4fXI9/KvhF8HPRnkCbIJwN+E4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yW9h8rcunQJwiS6e0Wzc4oFIdmG3JQ5ZSCGcMwS6XireO/QHPfCN3XdJXoDy339nq pATXt0FCcqVR6JRRVZzg7F3yVVRee+ax/Da0tzHcWnIFaP8mhZqaz2BnWXbFWeLR/l N45AE/qxkEBKlTGNICdH5cfYDiVbZomsB7cNFmo0= Date: Thu, 1 Feb 2024 10:05:59 -0800 From: Greg KH To: Daniel Bristot de Oliveira Cc: Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] tracing/timerlat: Move hrtimer_init to timerlat_fd open() Message-ID: <2024020122-uncombed-moody-a96d@gregkh> References: <7324dd3fc0035658c99b825204a66049389c56e3.1706798888.git.bristot@kernel.org> <2024020109-duffel-finally-4f0b@gregkh> <05c12163-d348-4615-a9e3-f36787629e0e@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05c12163-d348-4615-a9e3-f36787629e0e@kernel.org> On Thu, Feb 01, 2024 at 05:02:56PM +0100, Daniel Bristot de Oliveira wrote: > On 2/1/24 16:44, Greg KH wrote: > > On Thu, Feb 01, 2024 at 04:13:39PM +0100, Daniel Bristot de Oliveira wrote: > >> Currently, the timerlat's hrtimer is initialized at the first read of > >> timerlat_fd, and destroyed at close(). It works, but it causes an error > >> if the user program open() and close() the file without reading. > > > > What error exactly happens? Userspace, or the kernel crashes? > > sorry, kernel crash: > > # echo NO_OSNOISE_WORKLOAD > /sys/kernel/debug/tracing/osnoise/options > # echo timerlat > /sys/kernel/debug/tracing/current_tracer > > # cat ./timerlat_load.py > #!/usr/bin/env python3 > > timerlat_fd = open("/sys/kernel/tracing/osnoise/per_cpu/cpu0/timerlat_fd", 'r') > timerlat_fd.close(); > > # ./taskset -c 0 ./timerlat_load.py > Then obviously, this is a real, functional, change, so say so in the kernel changelog :) thanks, greg k-h