Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp986227rwb; Tue, 27 Sep 2022 07:06:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM713AFJoLbkJpHf8/PTAykLghWXTlJaPC82S5hVoAfmYpwNg9iAENeoCoMDKjRUTkDYSdZD X-Received: by 2002:a50:ee0c:0:b0:457:29d4:80df with SMTP id g12-20020a50ee0c000000b0045729d480dfmr12947624eds.397.1664287589370; Tue, 27 Sep 2022 07:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664287589; cv=none; d=google.com; s=arc-20160816; b=jL6qU/AblJxhsuDm9z8KVLBDtR/oxVkowaA1X0aKOS5BoI1foxdOp9dQcKWVa5o5hA AmWG9QP4+h6LACACjN4NTsfIsZaT4zjdI/wYlOyin1MqTKqbhU1dTXvek6xDNptnRjOa ACQaCHt4UOBI9N22r2KJU7FQcrGaAWAlQKNddYH++GrCRdAWs8J6PjAn25GMYPP3eb9O unLfvKDNVK3/+unV0rhLG9jR12d+IyOsHnAclC4/7QwxAFUQsBsJLukraQwaNfYreCc6 e+1fcq/PVZlYfa4EoEfYbET+jKUjRicL9iSVBvYr6iBtfm//tHBAEbjsiyn2LMHLExZS gOAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JajMUTWFWdf52LEvQ3sdkC4KhamKYR9MOGDGh7+XACA=; b=XyqrSTSR6HObAnKCQr91bZrPe8r9csuDXSxFeArtcY7GYbcfzGOXdFAqf70+689aWo LgkuKI2EVDkAvB1b2xuFh7iDbFeJ6M5YqMgQUHYqYzTCXdZutILs4w7ZQw12zCHQkftg xQZExns49/fgjrATfnpGpkgaTuo6AI+6itMVik6C76IbzpIfcFljuEvpsNLqTn9cq/uJ G3cu4EI1hWolvsCvCaqGEBX8IxQKMQvrhFXGtZmXQeryMsSem02IhaSqVR8Ga3AgzCnt D7cBZ4+hJ7uAKJsycVyZzdKksQ5oDCenRm0uwLTJ+IuPC8uqdMB/H4iTAuoqSQYeoHXi CqoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=UBtsrGDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho44-20020a1709070eac00b00781b5f92182si1719651ejc.38.2022.09.27.07.06.02; Tue, 27 Sep 2022 07:06:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=UBtsrGDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232004AbiI0NB3 (ORCPT + 99 others); Tue, 27 Sep 2022 09:01:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231588AbiI0NB1 (ORCPT ); Tue, 27 Sep 2022 09:01:27 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 120FAA2209 for ; Tue, 27 Sep 2022 06:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JajMUTWFWdf52LEvQ3sdkC4KhamKYR9MOGDGh7+XACA=; b=UBtsrGDqWvvym8LUIXYIIW653+ ia4Y+PnhWnbokr6Rn0/I9FQCCO3A8142BQhLdTYyK96xplEyXFQRfHHQi9q64fg9+uvStOY/oqfo1 P4eNU+/9IuPx4KEoA1PRjnyC0X3rctkoyBy03qhpNENCT8NzEw/7uW6C+zFLdvghOeGtivtjFwlgQ e87NSRAKcz9/9Bhi9+KhFFzdZGotAK1XQxu6RS7zQ6f+mm8zwI09ZW/8aVdJey+ZBqnmb3obCjgWg 6vUYbDVHNY/rS6dZ5bzglqv80ypOHMt38503jiDYjc4DCdhs25/JplTkb8KbptK4NwRZYJg1sG0HO W/wcO+rQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1odACy-00GHzB-C7; Tue, 27 Sep 2022 13:01:08 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E295B3001D6; Tue, 27 Sep 2022 15:01:07 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BFDDD2BDF120B; Tue, 27 Sep 2022 15:01:07 +0200 (CEST) Date: Tue, 27 Sep 2022 15:01:07 +0200 From: Peter Zijlstra To: Ricardo Neri Cc: Juri Lelli , Vincent Guittot , Ricardo Neri , "Ravi V. Shankar" , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , Len Brown , Mel Gorman , "Rafael J. Wysocki" , Srinivas Pandruvada , Steven Rostedt , Tim Chen , Valentin Schneider , x86@kernel.org, linux-kernel@vger.kernel.org, "Tim C . Chen" Subject: Re: [RFC PATCH 01/23] sched/task_struct: Introduce classes of tasks Message-ID: References: <20220909231205.14009-1-ricardo.neri-calderon@linux.intel.com> <20220909231205.14009-2-ricardo.neri-calderon@linux.intel.com> <20220916144112.GA29395@ranerica-svr.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220916144112.GA29395@ranerica-svr.sc.intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 16, 2022 at 07:41:13AM -0700, Ricardo Neri wrote: > At least on Intel processors, class 0 is a valid class. The scheduler needs to > have a notion of unclassified tasks and decide how to handle them, IMO. > > Intel processors currently support 8-bit, unsigned classes. I doubt other > architectures will ever support more than 256 classes. Short can handle all the > possible classification values and also the unclassified case. > > On the other hand, class 0 could be the default classification unless hardware > classifies differently. 0 would be special and need to be documented clearly. > This would work for Intel processors. You can always do: class = hw_class + 1; that makes 0 'special' and the hardware class can be trivially reconstructed by subtracting 1.