Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932345AbbHDItH (ORCPT ); Tue, 4 Aug 2015 04:49:07 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:55894 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932232AbbHDItE (ORCPT ); Tue, 4 Aug 2015 04:49:04 -0400 Date: Tue, 4 Aug 2015 10:48:55 +0200 From: Peter Zijlstra To: Tejun Heo Cc: mingo@redhat.com, hannes@cmpxchg.org, lizefan@huawei.com, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 1/3] cgroup: define controller file conventions Message-ID: <20150804084855.GK25159@twins.programming.kicks-ass.net> References: <1438641689-14655-1-git-send-email-tj@kernel.org> <1438641689-14655-2-git-send-email-tj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438641689-14655-2-git-send-email-tj@kernel.org> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1497 Lines: 34 On Mon, Aug 03, 2015 at 06:41:27PM -0400, Tejun Heo wrote: > > This patch defines CGROUP_WEIGHT_MIN/DFL/MAX to be used on all weight > based control knobs and documents the conventions that controllers > should follow on the unified hierarchy. Except for io.weight knob, > all existing unified hierarchy knobs are already compliant. A > follow-up patch will update io.weight. > +- If a controller implements ratio based resource distribution, the > + control knob should be named "weight" and have the range [1, 10000] > + and 100 should be the default value. The values are chosen to allow > + enough and symmetric bias in both directions while keeping it > + intuitive (the default is 100%). Aside from 100% being a sane 'default', what it actually is is a unit. 100% == 1. So I would suggest naming the thing CGROUP_WEIGHT_UNIT := 100, > +/* > + * All weight knobs on the default hierarhcy should use the following min, > + * default and max values. The default value is the logarithmic center of > + * MIN and MAX and allows 100x to be expressed in both directions. > + */ > +#define CGROUP_WEIGHT_MIN 1 > +#define CGROUP_WEIGHT_DFL 100 > +#define CGROUP_WEIGHT_MAX 10000 That said, I'm not entirely keen on having to change this. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/