Message ID | 20211012232522.714898-1-posk@google.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <SRS0=+gpB=PA=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C4CBC433EF for <linux-mm@archiver.kernel.org>; Tue, 12 Oct 2021 23:25:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B9EB060E53 for <linux-mm@archiver.kernel.org>; Tue, 12 Oct 2021 23:25:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B9EB060E53 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=posk.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 5AB086B006C; Tue, 12 Oct 2021 19:25:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 55B22900003; Tue, 12 Oct 2021 19:25:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 44A49900002; Tue, 12 Oct 2021 19:25:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0201.hostedemail.com [216.40.44.201]) by kanga.kvack.org (Postfix) with ESMTP id 374516B006C for <linux-mm@kvack.org>; Tue, 12 Oct 2021 19:25:32 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EBF0739468 for <linux-mm@kvack.org>; Tue, 12 Oct 2021 23:25:31 +0000 (UTC) X-FDA: 78689369262.17.AD04B04 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by imf23.hostedemail.com (Postfix) with ESMTP id BB61A90000AA for <linux-mm@kvack.org>; Tue, 12 Oct 2021 23:25:30 +0000 (UTC) Received: by mail-pj1-f50.google.com with SMTP id ls14-20020a17090b350e00b001a00e2251c8so820597pjb.4 for <linux-mm@kvack.org>; Tue, 12 Oct 2021 16:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posk.io; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+MCbUR+9Em0iYarChlkTpQ1HVke2G/DGf/+kVt506hA=; b=K9rtvqDADOFi/pV5Xt1D0nPncFQCJGbmTgJ6Gh9DcnS3GNIm588XShQ24y6u8kIcAB GmbYJg3UT98mpFJfsSaNTUzmRplRn67F3kZuwMvDNrZq+PENH7D9XR1Wl0+y91tTRCnD bCd4A2n2YUHcESbQsCNiVMQCg0SDCPV1gMYMeg1xO8RwEYoWoCvPqK2AsKDAxuIOzNAv z1BeJuotoWsSKzPV6HyMGPBbdxkbLLSMS0lwPoaLj/FWv/vMZzBzoFNAHRAJqP6t5So6 Ay5NNU+Wu84lNQ08vuDl9qk97LMNxXBm9PREA9ck+9zarZYhb4SNrlHrlnwW7aHv+/zq Ws9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+MCbUR+9Em0iYarChlkTpQ1HVke2G/DGf/+kVt506hA=; b=tpNlkX7L7MWQwF2tmXGUKeHPe2Ie9XNIpyWlokYsuuGCuWwTyrupOzv6hNpmqabcAY OKHF3swndtsbrQy1TcACXUnQQKXLxXgC4g7G2phyR4416Zqm3H6pnP+zr0LIe7I8fvZY ohJPsGNj0M+jAjF3GLc+1Ehbx+1qCsj785Jqy5AumEKDGddlKFGn42VmX86DykJQAkq+ Cu3Qzyjcl3dhTIVOXah6T8EEs+godbo3jvbCWMpw+YRWiA5clSUJPJ0Jpy+tV4ni+1NQ SckeenZ9jW3HNUWS+9pPBObZSuIIgSVuWZQGssOLjZyudy2WwxHvZEy/G6402WvVcQMJ 53/A== X-Gm-Message-State: AOAM5302zeYjigfwI+D7km22Rv4Qpxv31e8ard7zuPPn3Lc7Q+HPNVBk 3vTLbNt/WPA/4f3nrnmmRhestA== X-Google-Smtp-Source: ABdhPJxjh74j84b81uD2Wn5kWtHXWmrQZ1OVNkdEUMaIHUWxMYB0qGb8Uw91qe1lKFjIKloQRA4B7g== X-Received: by 2002:a17:902:db01:b0:13e:d9ac:b8ff with SMTP id m1-20020a170902db0100b0013ed9acb8ffmr33135606plx.46.1634081130322; Tue, 12 Oct 2021 16:25:30 -0700 (PDT) Received: from posk-g1.lan (23-118-52-46.lightspeed.sntcca.sbcglobal.net. [23.118.52.46]) by smtp.gmail.com with ESMTPSA id v20sm12675026pgc.38.2021.10.12.16.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 16:25:29 -0700 (PDT) From: Peter Oskolkov <posk@posk.io> X-Google-Original-From: Peter Oskolkov <posk@google.com> To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, Andrew Morton <akpm@linux-foundation.org>, Dave Hansen <dave.hansen@linux.intel.com>, Andy Lutomirski <luto@kernel.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Cc: Paul Turner <pjt@google.com>, Ben Segall <bsegall@google.com>, Peter Oskolkov <posk@google.com>, Peter Oskolkov <posk@posk.io>, Andrei Vagin <avagin@google.com>, Jann Horn <jannh@google.com>, Thierry Delisle <tdelisle@uwaterloo.ca> Subject: [PATCH v0.7 0/5] sched,mm,x86/uaccess: implement User Managed Concurrency Groups Date: Tue, 12 Oct 2021 16:25:17 -0700 Message-Id: <20211012232522.714898-1-posk@google.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: BB61A90000AA X-Stat-Signature: ysbeaoa3xm91xjbtzftcnykgw4qpseis Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=posk.io header.s=google header.b=K9rtvqDA; dmarc=none; spf=pass (imf23.hostedemail.com: domain of posk@posk.io designates 209.85.216.50 as permitted sender) smtp.mailfrom=posk@posk.io X-HE-Tag: 1634081130-791313 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
sched,mm,x86/uaccess: implement User Managed Concurrency Groups
|
expand
|
User Managed Concurrency Groups (UMCG) is an M:N threading subsystem/toolkit that lets user space application developers implement in-process user space schedulers. Key changes from the previous patchset https://lore.kernel.org/all/20210917180323.278250-1-posk@google.com/ : - userspace atomic helpers moved into mm/ - UMCG task states are now tagged with timestamps - cross-mm interactions (wakeups) are not permitted - several smaller fixes and refactorings These big things remain to be addressed (in no particular order): - support tracing/debugging - make context switches faster (see umcg_do_context_switch in umcg.c) - support other architectures - cleanup and post userspace support in tools/lib/umcg/ - cleanup and post selftests in tools/testing/selftests/umcg/ - allow cross-mm wakeups (securely) I'm working on finalizing libumcg and kselftests. Signed-off-by: Peter Oskolkov <posk@google.com> Peter Oskolkov (5): sched/umcg: add WF_CURRENT_CPU and externise ttwu mm, x86/uaccess: add userspace atomic helpers sched/umcg: implement UMCG syscalls sched/umcg: add Documentation/userspace-api/umcg.rst sched/umcg: add Documentation/userspace-api/umcg.txt Documentation/userspace-api/umcg.rst | 611 ++++++++++++++++ Documentation/userspace-api/umcg.txt | 594 ++++++++++++++++ arch/x86/entry/syscalls/syscall_64.tbl | 2 + arch/x86/include/asm/uaccess_64.h | 93 +++ fs/exec.c | 1 + include/linux/sched.h | 71 ++ include/linux/syscalls.h | 3 + include/linux/uaccess.h | 46 ++ include/uapi/asm-generic/unistd.h | 6 +- include/uapi/linux/umcg.h | 137 ++++ init/Kconfig | 10 + kernel/entry/common.c | 4 +- kernel/exit.c | 5 + kernel/sched/Makefile | 1 + kernel/sched/core.c | 12 +- kernel/sched/fair.c | 4 + kernel/sched/sched.h | 15 +- kernel/sched/umcg.c | 926 +++++++++++++++++++++++++ kernel/sys_ni.c | 4 + mm/maccess.c | 264 +++++++ 20 files changed, 2797 insertions(+), 12 deletions(-) create mode 100644 Documentation/userspace-api/umcg.rst create mode 100644 Documentation/userspace-api/umcg.txt create mode 100644 include/uapi/linux/umcg.h create mode 100644 kernel/sched/umcg.c -- 2.25.1