From mboxrd@z Thu Jan 1 00:00:00 1970 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 1EF4B189F3F for ; Fri, 17 Jan 2025 16:26:41 +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=1737131202; cv=none; b=EYi1q1flcE/4h+fgNXyO7DjHtZ753Kjfy4pttjpl3HAzxEcU+lw02DhKR7IS+CaP1t8wT1ROe3tktI/2P3fojelMpdN8WsCLTm4fp8rF4aFiQ5wtsO7lVrERQYI+LAoxxD2ut6f7yunJBRaosbsHO0b9pcMKl+DCY8HSlvBklck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737131202; c=relaxed/simple; bh=xlwOz1QtNhItox4ceTdvwNuz+EU4z9PnaiFpIUguLlQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GM2M8tInWIyRtVRDGLktZG63rF8QNlP8N6YVC+NgJoGnbfpgI7dhzLaSezsTZOZvKDBY+vaOYQxDh04b2wpv6+mLdn3KdnSSMv9fY3fGYdLN10xevo0M2yfXejuGyGXef/HWXF/zHV5UZ/pwuZmV6oQk082iyjzxamLyytY3F8c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H/mbNYWz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H/mbNYWz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99DAEC4CEDD; Fri, 17 Jan 2025 16:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737131201; bh=xlwOz1QtNhItox4ceTdvwNuz+EU4z9PnaiFpIUguLlQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H/mbNYWzgTg4Bpdt4823UxOyGtgi/4xGoAyv1DwXh08XRt2xxDSKFGp6UBQnJSzkC hnJfU4XemoNm4xz6C8GO5zamdwt9/IPjROdy2lPTrVy+JwITiMrVUGuawk6OSkyeAx S6GGGBqGHLjagNJaZDjzQuMVNyQujsetG/SoGWXEXSzGSzOWO5mwVoD9ftJFxgVLVw 4UbaFPIJr4WJeFK3mYh4+qq+4DsnH21GT0HLnwkIWGMfzJ5gNzObWZASww0shEXgMt GqVL6FzCZ3YpddIZx9DgOxCS8R5KUSnzWBTzaO7QyUY3giNuKl3lSrdnrMYhVSyVa1 HyX95pix8t4aQ== Date: Fri, 17 Jan 2025 06:26:40 -1000 From: Tejun Heo To: Andrea Righi Cc: Changwoo Min , void@manifault.com, kernel-dev@igalia.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/7] sched_ext: Implement event counter infrastructure and add an event Message-ID: References: <20250116151543.80163-1-changwoo@igalia.com> <20250116151543.80163-2-changwoo@igalia.com> 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: Hello, On Fri, Jan 17, 2025 at 10:49:55AM +0100, Andrea Righi wrote: > On Fri, Jan 17, 2025 at 12:15:37AM +0900, Changwoo Min wrote: > ... > > +/* > > + * The event counter is organized by a per-CPU variable to minimize the > > + * accounting overhead without synchronization. A system-wide view on the > > + * event counter is constructed when requested by scx_bpf_get_event_stat(). > > + */ > > +static DEFINE_PER_CPU(struct scx_event_stat, event_stats); > > Should we consider tracking these statistics per-scheduler rather than > globally (like adding scx_event_stat to sched_ext_ops)? > > It's not particularly important for now, but in the future, if we allow > multiple scx schedulers to be loaded at the same time, tracking separate > stats per-scheduler would be preferable. Yeah, eventually, but I don't think it affects anything user visible right now. Later, we may add an interface to query the stats for a specific scheduler provided the scheduler is a child of the current one and so on but we'd still need an interface to query "my stats" which the current interface can become. Thanks. -- tejun