From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758934AbdKPJ16 (ORCPT ); Thu, 16 Nov 2017 04:27:58 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:46215 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753589AbdKPJ1u (ORCPT ); Thu, 16 Nov 2017 04:27:50 -0500 X-Google-Smtp-Source: AGs4zMbbj1T4L5zUi6Em9T8yXqEcVPfzKaHvCWrSpDMeOVPZwhdHEm6QlaT9vSR9hkL03paKr104rOF0POwiE4HzIQY= MIME-Version: 1.0 In-Reply-To: <20171115130210.y37o3bpyqoo6jgzb@hirez.programming.kicks-ass.net> References: <20171026140750.119265-1-maco@android.com> <20171026140750.119265-3-maco@android.com> <20171115130210.y37o3bpyqoo6jgzb@hirez.programming.kicks-ass.net> From: Martijn Coenen Date: Thu, 16 Nov 2017 10:27:48 +0100 Message-ID: Subject: Re: [PATCH v3 2/6] ANDROID: binder: add min sched_policy to node. To: Peter Zijlstra Cc: Greg KH , John Stultz , Todd Kjos , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , Sherry Yang , Thomas Gleixner , Amit Pundir , LKML , devel@driverdev.osuosl.org, Martijn Coenen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 15, 2017 at 2:02 PM, Peter Zijlstra wrote: >> Internally, we use the priority map that the kernel >> uses, e.g. [0..99] for real-time policies and [100..139] >> for the SCHED_NORMAL/SCHED_BATCH policies. > > I will break that without consideration if I have to. That really isn't > something anybody outside of the core code should rely on. I mostly used these because it makes it easier to debug, since that range is used in other places in the kernel (and in trace events). All priority calculations use things that are in sched headers, like NICE_TO_PRIO, PRIO_TO_NICE, and MAX_USER_RT_PRIO. So things wouldn't necessarily break if you just changed the value ranges. If you inverted the range, that would be a problem...