Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp428516ybh; Tue, 10 Mar 2020 01:17:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtjFt6IwqDY13Zp4MoggzrZcPBatxHdTb07DS4iMVJDgJaP+o+Rd0Olh7FR6VHTrMhZ2vaS X-Received: by 2002:aca:450a:: with SMTP id s10mr285789oia.25.1583828250073; Tue, 10 Mar 2020 01:17:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583828250; cv=none; d=google.com; s=arc-20160816; b=nenLnt9e/kWzMEBrbTUTgDv78i1qYqOCZ0xDqlUuJla3/LPTnBaHdHMQ1VJpcR8mPM cNZRulSNM81vNRHtkMDDgH3pDQVoAk4MFv0dvDiuh093E63LhtPuFE3bsH8rHcMqDEYJ 2pp5ulKdVHLIT1b/R9D/afD0ePlDoDir00F9wIIdy/2b6cupIhRwUba+8OGX5OxDzBNO 35XDXYV2aUErcVn61O8Hyi8QzIR4g7Y9reBRNE0o8ATaCkvrTYi4XpnLmmssgA6MBZ88 L1Fny4ACE3nbVC6qEyA0BjdbkkoXqFhv1KxnU68NGErKv8ID0UgOB1UA2FE6aumAnpCd CIMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=fWc0P77T4tCbGyqI+V7xX9d/3TLSH622lOnUpmhc9WI=; b=mMikm2ahFQ6QRYyxLk+NzGEFeAEg+gX7ytUA47RXFhIUJztD2gxgeWQ2x5JG1xB8mX uFiq1t6V3Gb7vBigN974oM3MeMrPGFrruSZluBLPQsjGjfwO97zt8+pD/iTtHT+P45Pt JSFfyiqR4c1N4GuhyNoe88WimiMGka4kdwWTi9qN6GcakZ3SUivSK+ehzZuzV6ixOQeV U/j5npDbTldc6pBxCgFpGHSVaN/br3yk+/KEkiQ0UVQs7j3Z7noRG9lL1bUZhNXDbkQa 2ZEUZw+ynsP3mDvmswktxBwFTNaIp2JPvLkolaQmVCQdeuItX6pMw7Ms2JEXtICqQYO2 Aggw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16si7979231otm.231.2020.03.10.01.17.17; Tue, 10 Mar 2020 01:17:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726410AbgCJIP1 (ORCPT + 99 others); Tue, 10 Mar 2020 04:15:27 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:42330 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725919AbgCJIP0 (ORCPT ); Tue, 10 Mar 2020 04:15:26 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R771e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04452;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0TsC7ibe_1583828119; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0TsC7ibe_1583828119) by smtp.aliyun-inc.com(127.0.0.1); Tue, 10 Mar 2020 16:15:20 +0800 Subject: Re: [RFC PATCH] sched: fix the nonsense shares when load of cfs_rq is too, small To: Vincent Guittot Cc: Ben Segall , Peter Zijlstra , Ingo Molnar , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Mel Gorman , "open list:SCHEDULER" References: <44fa1cee-08db-e4ab-e5ab-08d6fbd421d7@linux.alibaba.com> <20200303195245.GF2596@hirez.programming.kicks-ass.net> <1180c6cd-ff61-2c9f-d689-ffe58f8c5a68@linux.alibaba.com> <49a4dd4a-e7b6-5182-150d-16fff2d101cf@linux.alibaba.com> From: =?UTF-8?B?546L6LSH?= Message-ID: Date: Tue, 10 Mar 2020 16:15:19 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/3/10 下午3:57, Vincent Guittot wrote: [snip] >>> That being said, having a min of 2 for scale_load_down will enable us >>> to have the tg->load_avg != 0 so a tg_weight != 0 and each sched group >>> will not have the full shares. But it will make those group completely >>> fair anyway. >>> The best solution would be not to scale down the weight but that's a >>> bigger change >> >> Does that means a changing for all those 'load.weight' related >> calculation, to reserve the scaled weight? > > yes, to make sure that calculation still fit in the variable > >> >> I suppose u64 is capable for 'cfs_rq.load' to reserve the scaled up load, >> changing all those places could be annoying but still fine. > > it's fine but the max number of runnable tasks at the max priority on > a cfs_rq will decrease from around 4 billion to "only" 4 Million. > >> >> However, I'm not quite sure about the benefit, how much more precision >> we'll gain and does that really matters? better to have some testing to >> demonstrate it. > > it will ensure a better fairness in a larger range of share value. I > agree that we can wonder if it's worth the effort for those low share > values. Wouldbe interesting to knwo who use such low value and for > which purpose AFAIK, the k8s stuff will use share 2 for the Best Effort type of Pods, but that's just because they want them run only when there are no other Pods want running, won't dealing with multiple shares under 1024 and desire good precision I suppose. Regards, Michael Wang > > Regards, > Vincent >> >> Regards, >> Michael Wang >> >> >>>