Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1155801pxb; Fri, 21 Jan 2022 11:02:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCR/Lg8QARAmrHMVJwI9Gw1jEwPhTuuT3MXBkosG1OtD6PHHZPEWDnZsIC7dlHnZD82R66 X-Received: by 2002:a63:82c3:: with SMTP id w186mr2100802pgd.530.1642791778855; Fri, 21 Jan 2022 11:02:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642791778; cv=none; d=google.com; s=arc-20160816; b=TLkXq1mar3hxka0s3NcFQzOmkkI+VI/2KhwIpHBLYJysAT+XvDl0FsC+iMcDLNpiZ9 K6JlJ29Gfekv1nAeMA5L7O4ZS0P75atg5Ll8wZFFcKiuzcvGdTbJPv7vXypmiuyvSQvq FEKB21KTxRV5WT0OBhbStHzNqmUnOdEPAhHEI22X1OiaJ57ZQKl5yw6uKX31Z7W1amqK +fSOXAR0pCFm1KfC6b/+oTsHhYI/RLXarZKyRguIJl13xKj3n+zGQCOwBxtysWtpykEc 19X7KmoOR8tibrbSPbMWYMkA+7nf2UmW3cD3/EA2eMRFSGpNHRpK/OM3Qie59Ltijagi Q7Wg== 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=qnafBOfaGAHL+V+2V6xLHrQXEkPNWUyyHRjzOTQQks0=; b=Ptgam20WD/nbi/43l4sKULUkUt6iBmNwIrJkaG51O+aaLqSdXrE8AalH+4VFmjXsvn i+XJYQjpsmwmYb7mZzEbOiAQz8i6EpF9uChYK+vGr3XmxFftyKhu3v/olkfRQSA74+FO /Q003XfyGWYISe1sNR+JOLeXVsECGLcjYuGbUUlXJn22LlK0BuOySZiLzI6/0VPFJH9j RbtKDceT1Hj/ahLFcd0qLscnL/cHEiEZXN+YgBlIDIpfImms/mAYaGWxHEVIgO+d4cmm tVLuwI98Uc6MtmcwIgWyB+5l7eLGxFGqL05fSWjW6r4B99/MWayWaAJ3U57AkiAZlzQR GsUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=X41mnegh; 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 v64si1365695pgd.505.2022.01.21.11.02.46; Fri, 21 Jan 2022 11:02:58 -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=casper.20170209 header.b=X41mnegh; 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 S1352763AbiASJA2 (ORCPT + 99 others); Wed, 19 Jan 2022 04:00:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237437AbiASJA1 (ORCPT ); Wed, 19 Jan 2022 04:00:27 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D4CAC061574; Wed, 19 Jan 2022 01:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=qnafBOfaGAHL+V+2V6xLHrQXEkPNWUyyHRjzOTQQks0=; b=X41mnegh42srhJgRjFzw2U39oF ik/ga3x206OM81Ma9yTWHodK6706mdjtlmS8QqItoSXc9Ue0Qqv8QHIAGwOSxIb0vENp+L5m5zVg/ 2Xvtm9bjVZtkIGC1TWptFA9/bRvlTSB/bTv/LtdEHijmaMKtLI2FzDXpjx7i+23GYUjNqFhScDqKN IrH8x+1khfrS73fXtt2zrSySG2T/cgWuIrttlTTbLNZjChilJEATxTpvPDok+nlBOR/+v6vIzpueR zoqHvMEfl6LTr8xeaHhDOKp5jGnYzXVa1vFNBWoRRMcgdWaaS1FxERozztzXfC0ZAhVH0A15cWnLD SUdsh4Wg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nA6ot-00AL9R-GZ; Wed, 19 Jan 2022 08:59:55 +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 6B9AB300222; Wed, 19 Jan 2022 09:59:54 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2E49A200CA459; Wed, 19 Jan 2022 09:59:54 +0100 (CET) Date: Wed, 19 Jan 2022 09:59:54 +0100 From: Peter Zijlstra To: Peter Oskolkov Cc: Peter Oskolkov , 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, avagin@google.com, jannh@google.com, tdelisle@uwaterloo.ca Subject: Re: [RFC][PATCH 3/3] sched: User Mode Concurency Groups Message-ID: References: <20211214204445.665580974@infradead.org> <20211214205358.701701555@infradead.org> <20211221171900.GA580323@dev-hv> 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 Tue, Jan 18, 2022 at 10:19:21AM -0800, Peter Oskolkov wrote: > =========== signals and the general approach > > My version of the patchset has all of these things working. What it > does not have, > compared to the new approach we are discussing here, is runqueues per server > and proper signal handling (and potential integration with proxy execution). > > Runqueues per server, in the LAZY mode, are easy to emulate in my patchset: > nothing prevents the userspace to partition workers among servers, and have > servers that "own" their workers to be pointed at by idle_server_tid_ptr. > > The only thing that is missing is proper treating of signals. But my patchset > does ensure a single running worker per server, had pagefaults and preemptions > sorted out, etc. Basically, everything works except signals. This patchet > has issues with pagefaults, Already fixed pagefaults per: YeGvovSckivQnKX8@hirez.programming.kicks-ass.net > worker timeouts I still have no clear answer as to what you actually want there. > , worker-to-worker context > switches (do workers move runqueues when they context switch?), etc. Not in kernel, if they need to be migrated, userspace needs to do that. > And my patchset now actually looks smaller and simpler, on the kernel side, > that what this patchset is shaping up to be. > > What if I fix signals in my patchset? I think the way you deal with signals > will work in my approach equally well; I'll also use umcg_kick() to preempt > workers instead of sending them a signal. > > What do you think? I still absolutely hate how long you do page pinning, it *will* wreck things like CMA which are somewhat latency critical for silly things like Android camera apps and who knows what else. You've also forgotten about this: YcWutpu7BDeG+dQ2@hirez.programming.kicks-ass.net That's not optional given how you're using page-pinning. Also, I think we need at least one direct access to the page after getting the pin in order to make it work. That also very much limits it to Anon pages.