Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp766900pxb; Wed, 8 Sep 2021 11:50:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCpSORRiZmzB14+khSa+26u8eqZjUdNW2huCtDoIFQ5uUO0oGCF8axBRcSffNecGCUB0rH X-Received: by 2002:a5d:8458:: with SMTP id w24mr1104305ior.168.1631127011127; Wed, 08 Sep 2021 11:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631127011; cv=none; d=google.com; s=arc-20160816; b=e2V3xdrpKFtq4lUwl2iIvNw2aWOXfpNchv3RiBSksdUsgWpN4stNPaSEmE5UeH3e6i a0Kt2yDR2jdmw22pzIdkjgWxhFgT8DMwRG5/wm1CFYU0V7V2A+ByCmhx76dUSaFYNsne spPzWXjlST5Mj5MFFnAS5Hp/VU+nmYTEr8BGr/qkXhzXR3nu1NobJW7a5Te3OcJjKvp4 JcF1etuXNQ4qDsufYEteOAPdjZbr+wp7xd+cz1O9HiF1ohRVU9aUaHJA3n32Y+hZYlJD u1+6W1WaWPuB/hsWfQrgcCDFTiv+xbAHW/QqkeKUWI2EYjZX9OcO/bBCTN/lIzJsn9QO Q65g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4F7KTw8b2Sf/F6Hrpsu9jZkL1CByiMkGRka7IEfpAvo=; b=u2zP1O6UnShRyDjcWGufKuO924pGeaGkTi6PE4j7Xu7GzAnhP+w0vbns7mwrfypYWl kR+nmV06slaXElWgiJ+zi/KucE62l3qXRsiB6YLZdr2Yxq0ew0bo3czMaelR4JM41ESq 45pf48Cdy/35xrEzL8OWS28qyVX8saBdzKc2dH4O07mzsdZGFRNgdZLxTwB0aftdPGLZ uzl1SPMewhjNiIrCvyZLXZwITy1fCAn7X7TcTpC3hH9GgUfJjV15bOcNQ58VsbchVON4 JQwB7iWF4hT3Wzti8hWpU1/7p776rIQ8HDxxg8+1Uc7i6GnAF2Hl1XvvRc90WngjpdLQ DvYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@posk.io header.s=google header.b=CVM0ZsEF; 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 b13si2910121ilq.35.2021.09.08.11.49.58; Wed, 08 Sep 2021 11:50:11 -0700 (PDT) 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=@posk.io header.s=google header.b=CVM0ZsEF; 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 S1349162AbhIHSuU (ORCPT + 99 others); Wed, 8 Sep 2021 14:50:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348231AbhIHSuU (ORCPT ); Wed, 8 Sep 2021 14:50:20 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C04DAC06175F for ; Wed, 8 Sep 2021 11:49:11 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d17so1860366plr.12 for ; Wed, 08 Sep 2021 11:49:11 -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=4F7KTw8b2Sf/F6Hrpsu9jZkL1CByiMkGRka7IEfpAvo=; b=CVM0ZsEFfRAM8aDm30mklDPrHdVrbL1OWZZ2IV1+rairSkLVMUYPkOX3QgoL0ZO9Hd xPcwsTnZhYx2o0sR0hqvwYIV0w95Md1hxC2f0CY2UWAFWTdzrJUgGPe5bSFmDJV67WnN nsuSJyCtApbrtdUVYUkttjzIQkw1y/TaMuVC+OJbBRdcALt7A1YK8PETbwr+xnyJ0uZN caZcJOSKqkJDcie41UOARgjpriY4+dM/RNYNMBzjxI5W34Ar41vHGXxt3PnCK3yAjv0f 1Fti90DYOgZLwc1Td5xRrrjM1EjAwz/rCRFMXOldWsSEMQRDJZSBp3roCjygD4Qb1e6N 7Rjg== 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=4F7KTw8b2Sf/F6Hrpsu9jZkL1CByiMkGRka7IEfpAvo=; b=DULSFS6aGJLZBpWI/8Ni4NZ7Avp5KYRlG8rxpnNjfX1DuwfApfQ5wwwjoBJJvDYOZ+ AAOcLEteOli6aApz7gw3KFVmsPMHxnk1ZY/Cq4XjJSYeWQs4qgkL+BXrVUXP4bCC/UPe /GPEn0i5Y3cF9YmDKSDLPjZZ6y6jNIpsDB7nY/Uo38Esxq8hM2Dq2U2/9YF452A47niI 7jnIA5pKP+M2xGFmTiF6FWacLU7F0mueTemZJWhTS5gDYtBF8a1ljiuTiYZU9RaF/k2A UBZl7WWwD/4/XmAxkzJS2xRqcqyqd2NsCB9IuQx4fUrEsb1QuPRlwpmfp7ykMTR8RuPj vj6A== X-Gm-Message-State: AOAM5316iGgkZJUTelQFFLqZUTjV8r+kn2QRRSwMTptaqw/P/CpR+7c2 XJxGeWGY3b87SlvEH4Fgn9Etcg== X-Received: by 2002:a17:90a:3ec4:: with SMTP id k62mr5795759pjc.32.1631126951276; Wed, 08 Sep 2021 11:49:11 -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 m64sm3645640pga.55.2021.09.08.11.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 11:49:11 -0700 (PDT) From: Peter Oskolkov X-Google-Original-From: Peter Oskolkov To: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Cc: Paul Turner , Ben Segall , Peter Oskolkov , Peter Oskolkov , Andrei Vagin , Jann Horn , Thierry Delisle Subject: [PATCH 0/4 v0.5] sched/umcg: RFC UMCG patchset Date: Wed, 8 Sep 2021 11:49:01 -0700 Message-Id: <20210908184905.163787-1-posk@google.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an update on v0.4: https://lore.kernel.org/lkml/20210801200617.623745-1-posk@google.com/ Key changes: v0.3 => v0.4: - made idle workers list logic simpler - only one idle server tracking - removed two fields from struct umcg_task - added timeout handling - added worker preemption - added a doc patch that now documents the syscalls and state transitions. v0.4 => v0.5: - refactored idle workers list management, as suggested by Thierry Delisle here: https://lore.kernel.org/lkml/3530714d-125b-e0f5-45b2-72695e2fc4ee@uwaterloo.ca/ I will now clean up libumcg (userspace) and selftests and post them in a follow-up patchset. Peter Oskolkov (4): sched/umcg: add WF_CURRENT_CPU and externise ttwu sched/umcg: RFC: add userspace atomic helpers sched/umcg: RFC: implement UMCG syscalls sched/umcg: add Documentation/userspace-api/umcg.rst Documentation/userspace-api/umcg.rst | 546 ++++++++++++++++++++++ arch/x86/entry/syscalls/syscall_64.tbl | 2 + include/linux/sched.h | 6 + include/linux/syscalls.h | 4 + include/uapi/asm-generic/unistd.h | 8 +- include/uapi/linux/umcg.h | 114 +++++ init/Kconfig | 10 + kernel/exit.c | 7 + kernel/sched/Makefile | 1 + kernel/sched/core.c | 20 +- kernel/sched/fair.c | 4 + kernel/sched/sched.h | 15 +- kernel/sched/umcg.c | 618 +++++++++++++++++++++++++ kernel/sched/umcg.h | 325 +++++++++++++ kernel/sys_ni.c | 4 + 15 files changed, 1673 insertions(+), 11 deletions(-) create mode 100644 Documentation/userspace-api/umcg.rst create mode 100644 include/uapi/linux/umcg.h create mode 100644 kernel/sched/umcg.c create mode 100644 kernel/sched/umcg.h -- 2.25.1