From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) (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 5CCF44C7D for ; Sat, 18 Jan 2025 00:01:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.60.130.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737158481; cv=none; b=gOR6MXA9eni1yKPNFLe9xrer5aqIMeYCZI8Sh19ctsWGoalGU3fdaFgkApdVXn8asIPKZrP8PZYPHFuf8/H3zfeOXcUPBLs6Thy3bVZEKC8ksd6lsUwUA7b9V87bU6qrxyQCgsKSgS7BrQbI4wp3Et13FCHssm9Isy5WHvBgeeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737158481; c=relaxed/simple; bh=vwu32Zu4LFlBUoGo7bVRaCyYWL45sAD/d7kHiamVGkY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=m/MglAfa9+vbIPnmR3ewmwDbu5rgEBWwdDxKynUTQY0sLsfOHdZpDbQrLxG1WfibsPEzqm6Em29QLHxaL8sip7Rs/m7Alzh5Di6+KWdLCNoT24KECUc6x/9jAmDgXKvQZA2Z3Ac54j+V+K05ebMCf/fGY7WzC3j7NvvmX05YDM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=oEevXiTi; arc=none smtp.client-ip=178.60.130.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="oEevXiTi" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lqcF76oHchTunDr+iImI5QOnNH48nPONCN90LhGTQZ4=; b=oEevXiTiTy+FagDsaDczmRhQNu 2LwQZVgi4nQJGlxHJyO0k+taF9hLjGopVYKfNOP1awrGFcbkdK/jY4tWtk1dx+UNSKm+H0LzBOpg8 dHi6sJzQJ0ICpl+Is0/6G29dG+ey6Za1BgQHeXphNHxcUoy1jRjaHFzcQ6s+PczJEzYVmI+z4u6QQ eZrRoEsO992zOiv8ywVFMey+hYg2i0AlfK2pXIz+pDa8Zjpf+viLBBymc0lUPYhzBO10/gbZ9xfbC AnQvENCgNU6wkepCdCsg1E9H94jfqW7P23BFxE48m+uafDKuc3fvdY4kExLVGkHMz+LBxO/qRAE5o DE/5da2w==; Received: from [58.29.143.236] (helo=[192.168.1.6]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1tYwGo-00HOLQ-6M; Sat, 18 Jan 2025 01:00:58 +0100 Message-ID: <51b75b0a-7725-4634-9a05-8caa392eaef8@igalia.com> Date: Sat, 18 Jan 2025 09:00:52 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/7] sched_ext: Implement event counter infrastructure and add an event To: Andrea Righi Cc: tj@kernel.org, void@manifault.com, kernel-dev@igalia.com, linux-kernel@vger.kernel.org References: <20250116151543.80163-1-changwoo@igalia.com> <20250116151543.80163-2-changwoo@igalia.com> From: Changwoo Min Content-Language: en-US, ko-KR, en-US-large, ko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello, Thank you for the suggestion, Andrea! On 25. 1. 17. 18:49, 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. It will be useful to get per-scheduler information. Since how the scheduler composability will be embodied is wide open at this point, I will revisit the interface design as the composability design gets more concrete. Regards, Changwoo Min