From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751981AbcEPMXE (ORCPT ); Mon, 16 May 2016 08:23:04 -0400 Received: from forward-corp1m.cmail.yandex.net ([5.255.216.100]:45777 "EHLO forward-corp1m.cmail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbcEPMXC (ORCPT ); Mon, 16 May 2016 08:23:02 -0400 Authentication-Results: smtpcorp1m.mail.yandex.net; dkim=pass header.i=@yandex-team.ru Subject: Re: [PATCH RFC 0/3] sched/fair: cpu time reserves for cgroups To: Peter Zijlstra References: <146339085068.25295.7687045977863852568.stgit@buzz> <20160516111849.GN3193@twins.programming.kicks-ass.net> Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Tejun Heo , cgroups@vger.kernel.org, containers@lists.linux-foundation.org From: Konstantin Khlebnikov Message-ID: <5739BB7E.8010902@yandex-team.ru> Date: Mon, 16 May 2016 15:22:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160516111849.GN3193@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16.05.2016 14:18, Peter Zijlstra wrote: > On Mon, May 16, 2016 at 12:36:19PM +0300, Konstantin Khlebnikov wrote: >> This feature allows to change cpu cgroup weight for a limited time. >> >> Cgroup interface: >> cpu.cfs_reserve_us - reserved time for each cpu.cfs_period_us >> cpu.cfs_reserve_shares - group weight during reserved time >> >> While cfs group consumes reserved cpu time it has different weight, >> thus it gets different vruntime penalty for that execution. >> >> ^ weight >> | >> | >> reserve | >> shares -------* >> | | >> | | >> | | >> shares - *-----------------* >> | | >> | | >> 0------|-----------------|-----------> time >> reserve quota >> >> Reserve can work as a "low limit": boost weight for "guaranteed" time, >> and as a "high limit": give normal weight for a limited time and allow >> utilize cpu when nobody else needs it. >> > > You forgot to explain why I should care about this. As I told this works as low-limit or high-limit which allow to control cpu time distribution without hard limits and throttling. Present quota/hard limit has well known problems when it throttle task inside kernel where it holds mutexes. Also it's too strict and doesn't allow utilization of unused cpu time. -- Konstantin