Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp63578pxb; Thu, 27 Jan 2022 15:09:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjkOgJ62lL/BOtx4Xyh5jbnnLOHxBJ4JNC6wGHWzpuYPWwh8Ske6lL5YdJe81KWaTbDpwa X-Received: by 2002:a17:907:6e91:: with SMTP id sh17mr4708646ejc.532.1643324990061; Thu, 27 Jan 2022 15:09:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643324990; cv=none; d=google.com; s=arc-20160816; b=tmt37+cfPmGpVh4uUytm5GkDYGjZNUYRsRXZ7C90wNZ3HO4rW5XMhrc3SLALZiYnJL zpvlhO1qQT7HLI2FtiQjeRRjcSbdGbl8vpmL6ai9m9cGXbIU4iVQkI90ECEYo2/e6Nab 1sIK/k1wkeUejTJgztVYzkBKik0xKP7ryOLTk3n6Lyu+o5qhu2V/rwFA+WrhhBb4KMdW 4BFFc+cL9/XXdjHt3O/peV4j8D4NEx1JACkkds/UXzfk80FJ6EJSmAnHNZldyhoIbacn hinNp0dfYuK9WAnZNpM/qXsY9AzzADTZdncrEKJWn2S1PwYCDDwlqSAx47KHcgM2WfRN uIsw== 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=xCYE4SmkeSrJ/gO0loi27APL7J8Db6LU2KX4K0PIjaI=; b=hkUWbI0aIPllNQ4iNW6H5srt3I/67wJncqPm+u2Yj5ZuC7LDVkoJlrK57lgoZWOUgp FOVO5lc2LYDEv/Z7KwOfDlzHEWsDwIZsDvg27PnqTL9fZpk+Jcq5vRbFsdSTBFTnzDRz uEKnqE+t/gtcJHEDf+P6sA5XsorD0LRfD+GYzkkZIwbDsluL7nzYJxivS+5woQ12X7bS nxVdy/m0WSKw1fbivOw3kSxkoOJBvwLFjHKQmtndShNujstJ13wcJJDQe/K1DEHPGVGt FMVWy8Ek4x/IXJDYmebj1jAck6nU2359uZa8x0qjLW3QFRrb+p59RFEaTbn2uQ8kpQE1 OLlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=A30XOGuJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nc29si1899044ejc.692.2022.01.27.15.08.44; Thu, 27 Jan 2022 15:09:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=A30XOGuJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236343AbiA0M0w (ORCPT + 99 others); Thu, 27 Jan 2022 07:26:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbiA0M0v (ORCPT ); Thu, 27 Jan 2022 07:26:51 -0500 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 BCB16C061714; Thu, 27 Jan 2022 04:26:51 -0800 (PST) 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=xCYE4SmkeSrJ/gO0loi27APL7J8Db6LU2KX4K0PIjaI=; b=A30XOGuJA/JxBw4lIYvZJ/9x2j 0k8YY2KWX97rf6IFh3fwraK1Gvl801c0RPrWiKA7VSER0jW+KZKlJ9VSE6T1I7mV84wCc/7hHPIRZ q9fLE3bCZmOEAgqrw1Nq+DY90K8AgD5+LOgXzhY5xsPUf32D7QsmO3BcZ2XYV9/znw1Ng0WM+HWX6 HlcjbQY/ILaKk3zPrXlBkR9NmOTzQ18Z/dq7HNONjMU+X93Pt5K5DhO+D/FoKOjs3yDbeFB4n1dpH emS+RF/gag6W6gfxdTPpG16xiI/s0sRVUYV47AvsDBegvX+Kdg6bfeJPI/z39+V8Nq7u6R1DLvzZ3 t0uYPFTw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD3r9-004AGk-BN; Thu, 27 Jan 2022 12:26:27 +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 8FFC93002A6; Thu, 27 Jan 2022 13:26:26 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 79F342B52092A; Thu, 27 Jan 2022 13:26:26 +0100 (CET) Date: Thu, 27 Jan 2022 13:26:26 +0100 From: Peter Zijlstra To: Tao Zhou Cc: mingo@redhat.com, tglx@linutronix.de, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, x86@kernel.org, pjt@google.com, posk@google.com, avagin@google.com, jannh@google.com, tdelisle@uwaterloo.ca, mark.rutland@arm.com, posk@posk.io Subject: Re: [RFC][PATCH v2 5/5] sched: User Mode Concurency Groups Message-ID: References: <20220120155517.066795336@infradead.org> <20220120160822.914418096@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 24, 2022 at 10:46:17PM +0800, Tao Zhou wrote: > > +/** > > + * sys_umcg_wait: transfer running context > > + * > > + * Called like: > > + * > > + * self->state = UMCG_TASK_RUNNABLE | UMCG_TF_COND_WAIT; > > + * ... > > + * sys_umcg_wait(0, time); > > + * > > + * The syscall will clear TF_COND_WAIT and wait until state becomes RUNNING. > > + * The code '...' must not contain syscalls > > + * > > + * If self->next_tid is set and indicates a valid UMCG task with RUNNABLE state > > + * that task will be made RUNNING and woken -- transfering the running context > > + * to that task. In this case self->next_tid is modified with TID_RUNNING to > > + * indicate self->next_tid is consumed. > > + * > > + * If self->next has TID_RUNNING set, it is validated the related task has > > /self->next/self->next_tid/ Yeah, there's more of that, I'll be sure to go re-read all the comments.