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 C5AEDC4332F for ; Mon, 12 Dec 2022 11:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231811AbiLLLX5 (ORCPT ); Mon, 12 Dec 2022 06:23:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231972AbiLLLX3 (ORCPT ); Mon, 12 Dec 2022 06:23:29 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AB5126F2 for ; Mon, 12 Dec 2022 03:22:51 -0800 (PST) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4NVzfT28ljzJpK8; Mon, 12 Dec 2022 19:19:13 +0800 (CST) Received: from [10.67.102.169] (10.67.102.169) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 12 Dec 2022 19:22:49 +0800 CC: , Vincent Guittot , Joel Fernandes , Honglei Wang , Peter Zijlstra , Tim Chen , Mel Gorman , Juri Lelli , Rik van Riel , Aaron Lu , Abel Wu , K Prateek Nayak , "Gautham R . Shenoy" , Ingo Molnar , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , Valentin Schneider , Hillf Danton , Len Brown , Chen Yu , Tianchen Ding , , Josh Don Subject: Re: [PATCH v3 1/2] sched/fair: Introduce short duration task check To: Chen Yu References: <3A5DA66F-4330-4FC4-9229-998CF98F663E@joelfernandes.org> From: Yicong Yang Message-ID: Date: Mon, 12 Dec 2022 19:22:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.169] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/12/7 22:24, Chen Yu wrote: > Hi Josh, > On 2022-12-06 at 18:23:47 -0800, Josh Don wrote: >>> We don't want to add more dedicated knobs. So using >>> sysctl_sched_min_granularity as you are doing in this patch looks ok >> >> If not a knob, then maybe at least a smaller hardcoded value? Several >> milliseconds seems like too long for this optimization; the >> opportunity cost of not doing the idle search likely doesn't make >> sense if the waker is going to be active for several additional >> milliseconds. I would have guessed something on the order of 100us. >> >> Chen, what is the run duration of tasks in your ping pong example? > OK, I'll measure the duration of all the tests and summarize the data later. > If we decide to use sysctl_sched_min_granularity as the threshold of a short task, can we also export p->se.dur_avg (somewhere like /proc/[pid]/sched)? It may be helpful to choose a proper value for sysctl_sched_min_granularity. Thanks.