From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAE03C433F5 for ; Thu, 27 Jan 2022 12:26:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6AF096B0072; Thu, 27 Jan 2022 07:26:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 65F146B0073; Thu, 27 Jan 2022 07:26:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 54EE86B0075; Thu, 27 Jan 2022 07:26:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0047.hostedemail.com [216.40.44.47]) by kanga.kvack.org (Postfix) with ESMTP id 47A2B6B0072 for ; Thu, 27 Jan 2022 07:26:40 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 01BA578348 for ; Thu, 27 Jan 2022 12:26:40 +0000 (UTC) X-FDA: 79075990560.11.CF5D0EE Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by imf08.hostedemail.com (Postfix) with ESMTP id B79E6160005 for ; Thu, 27 Jan 2022 12:26:39 +0000 (UTC) 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: X-Rspamd-Queue-Id: B79E6160005 X-Rspam-User: nil Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=A30XOGuJ; dmarc=none; spf=none (imf08.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org X-Stat-Signature: zgtieauuwbyw89j9si6dzj3un16wz9yp X-Rspamd-Server: rspam08 X-HE-Tag: 1643286399-454555 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.