From patchwork Wed May 18 11:30:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1632783 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=RkvQJxJz; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=89.238.66.15; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L39m84xFvz9sGG for ; Wed, 18 May 2022 21:31:01 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 86BE531E0746; Wed, 18 May 2022 13:30:53 +0200 (CEST) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by helium.openadk.org (Postfix) with ESMTPS id 2857531E045F for ; Wed, 18 May 2022 13:30:34 +0200 (CEST) Received: by mail-wr1-f41.google.com with SMTP id r23so2295790wrr.2 for ; Wed, 18 May 2022 04:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1jZaXxn9YuBZr9qSzuGgqA9JIqFTrgPLRaNxHbQ7dFE=; b=RkvQJxJzU1PQjULxq17nN6nM2Ph/p/S9ACoqmeuEbZJWDnpnMK6sipmv6PyGKZYgNR E8Lt/E2yzTUzpJsU5BCbJbyBvDbSVSlpJVFeVrg7mw+1Ho5jkAUkZsZ6m0ZgYxxJPRZY iJXXDUU2mz1ciBOLvP78TpleATq4cBPSO97dGhRpIR/qAybfj2Xw19w/rZYsx5HF0Dk9 IM2RCBe6PqP2eoNJY8qkpTbu/FLTnwSu1mvGjORgSyDo7aOlkYtq94LWQkqFNSW9KReb 3cZdsP0VGua1L+iTUJHBl84M1OuzS6EMKpeVcadf2BJtsZ+WiB/dlBbzHn8KOSdp/TBp UNlw== 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=1jZaXxn9YuBZr9qSzuGgqA9JIqFTrgPLRaNxHbQ7dFE=; b=jehbuUdfKoNYBRGbxlXT1qSQ0dplqUvm7Qa5fM8qvx39/HQADbA0JW8EVi1Wz79PWC 8dB3aBC/35XYVOMOHt+hqGXVBnFwHDyRVWrPe3A8iF3jBAAw4j3U1lBTntmvr1Awmbnl ApirrJ33xQXqFbblYYXSbW5OVLqwAW+CfPA1ALqRSA1fyPu2uMHomZz2LsjxIM3yLjLL iGs1r8E+xY1dkiG1j3+Rd3kflfLaDyCzdkzn8dK/LAdGu318uQRotPVicmtQm38sqFt+ eXI8F9EPvmevDAAB8HO7sdHZwN1zE0dxDlgTkeP1WCnMw97IJMk40rISeQcty0VznJ/e xAsw== X-Gm-Message-State: AOAM5333vUEj0GXys5iO+P3fGdfzdJmu53vbuQRtWtKrDGJI6SErTmw4 jTSbFfPHMMZ4ZpMHsqxibAC7o3hKgyQ= X-Google-Smtp-Source: ABdhPJzKM5iOvo5nSCtuxHSXYbn7sIfaQt1Xs/Ph8zbJnIOOTCaSR2l3fnGuYK6Q82p66y42ccvaNQ== X-Received: by 2002:a05:6000:1883:b0:205:c0cb:33c6 with SMTP id a3-20020a056000188300b00205c0cb33c6mr23261004wri.39.1652873433366; Wed, 18 May 2022 04:30:33 -0700 (PDT) Received: from atlas.home (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id y21-20020a7bcd95000000b0039489e1bbd6sm4043521wmj.47.2022.05.18.04.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 04:30:32 -0700 (PDT) From: Romain Naour To: devel@uclibc-ng.org Date: Wed, 18 May 2022 13:30:28 +0200 Message-Id: <20220518113028.201877-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Message-ID-Hash: AHBRHTHT3ESBA3SYCLXNW7KKJ7QR7RI7 X-Message-ID-Hash: AHBRHTHT3ESBA3SYCLXNW7KKJ7QR7RI7 X-MailFrom: romain.naour@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH] define RLIMIT_RTTIME, bump RLIMIT_NLIMITS List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This macro exists since Linux 2.6.25 [1] and is defined in glibc since 2.14 [2] for sparc and most supported architectures. RLIMIT_RTTIME has been added later for mips [3] and alpha [4]. For example, RLIMIT_RTTIME is needed to build qemu 7.0.0 with Linux user-land emulation support [5]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=78f2c7db6068fd6ef75b8c120f04a388848eacb5 [2] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=67f86a251e0d36107fe28999281d46e76941c7b9 [3] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8969f4df1a526aa60dd0bc1c4736cf02104d4a05 [4] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=53c2cb7641bd866398156625ef672bbd2d78a0d8 [5] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=244fd08323088db73590ff2317dfe86f810b51d7 Signed-off-by: Romain Naour --- libc/sysdeps/linux/alpha/bits/resource.h | 8 +++++++- libc/sysdeps/linux/common/bits/resource.h | 8 +++++++- libc/sysdeps/linux/mips/bits/resource.h | 8 +++++++- libc/sysdeps/linux/sparc/bits/resource.h | 8 +++++++- libc/sysdeps/linux/sparc64/bits/resource.h | 8 +++++++- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/libc/sysdeps/linux/alpha/bits/resource.h b/libc/sysdeps/linux/alpha/bits/resource.h index 74f4eed69..78b790d86 100644 --- a/libc/sysdeps/linux/alpha/bits/resource.h +++ b/libc/sysdeps/linux/alpha/bits/resource.h @@ -99,7 +99,13 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - __RLIMIT_NLIMITS = 15, + /* Maximum CPU time in µs that a process scheduled under a real-time + scheduling policy may consume without making a blocking system + call before being forcibly descheduled. */ + __RLIMIT_RTTIME = 15, +#define RLIMIT_RTTIME __RLIMIT_RTTIME + + __RLIMIT_NLIMITS = 16, __RLIM_NLIMITS = __RLIMIT_NLIMITS #define RLIMIT_NLIMITS __RLIMIT_NLIMITS #define RLIM_NLIMITS __RLIM_NLIMITS diff --git a/libc/sysdeps/linux/common/bits/resource.h b/libc/sysdeps/linux/common/bits/resource.h index df0ba56d9..92b67eb23 100644 --- a/libc/sysdeps/linux/common/bits/resource.h +++ b/libc/sysdeps/linux/common/bits/resource.h @@ -99,7 +99,13 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - __RLIMIT_NLIMITS = 15, + /* Maximum CPU time in µs that a process scheduled under a real-time + scheduling policy may consume without making a blocking system + call before being forcibly descheduled. */ + __RLIMIT_RTTIME = 15, +#define RLIMIT_RTTIME __RLIMIT_RTTIME + + __RLIMIT_NLIMITS = 16, __RLIM_NLIMITS = __RLIMIT_NLIMITS #define RLIMIT_NLIMITS __RLIMIT_NLIMITS #define RLIM_NLIMITS __RLIM_NLIMITS diff --git a/libc/sysdeps/linux/mips/bits/resource.h b/libc/sysdeps/linux/mips/bits/resource.h index b204aefd6..48a97f62e 100644 --- a/libc/sysdeps/linux/mips/bits/resource.h +++ b/libc/sysdeps/linux/mips/bits/resource.h @@ -99,7 +99,13 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - __RLIMIT_NLIMITS = 15, + /* Maximum CPU time in µs that a process scheduled under a real-time + scheduling policy may consume without making a blocking system + call before being forcibly descheduled. */ + __RLIMIT_RTTIME = 15, +#define RLIMIT_RTTIME __RLIMIT_RTTIME + + __RLIMIT_NLIMITS = 16, __RLIM_NLIMITS = __RLIMIT_NLIMITS #define RLIMIT_NLIMITS __RLIMIT_NLIMITS #define RLIM_NLIMITS __RLIM_NLIMITS diff --git a/libc/sysdeps/linux/sparc/bits/resource.h b/libc/sysdeps/linux/sparc/bits/resource.h index 1005aeced..9bff26d00 100644 --- a/libc/sysdeps/linux/sparc/bits/resource.h +++ b/libc/sysdeps/linux/sparc/bits/resource.h @@ -98,7 +98,13 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - __RLIMIT_NLIMITS = 15, + /* Maximum CPU time in µs that a process scheduled under a real-time + scheduling policy may consume without making a blocking system + call before being forcibly descheduled. */ + __RLIMIT_RTTIME = 15, +#define RLIMIT_RTTIME __RLIMIT_RTTIME + + __RLIMIT_NLIMITS = 16, __RLIM_NLIMITS = __RLIMIT_NLIMITS #define RLIMIT_NLIMITS __RLIMIT_NLIMITS #define RLIM_NLIMITS __RLIM_NLIMITS diff --git a/libc/sysdeps/linux/sparc64/bits/resource.h b/libc/sysdeps/linux/sparc64/bits/resource.h index 366e5c2d9..255fb9734 100644 --- a/libc/sysdeps/linux/sparc64/bits/resource.h +++ b/libc/sysdeps/linux/sparc64/bits/resource.h @@ -98,7 +98,13 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - __RLIMIT_NLIMITS = 15, + /* Maximum CPU time in µs that a process scheduled under a real-time + scheduling policy may consume without making a blocking system + call before being forcibly descheduled. */ + __RLIMIT_RTTIME = 15, +#define RLIMIT_RTTIME __RLIMIT_RTTIME + + __RLIMIT_NLIMITS = 16, __RLIM_NLIMITS = __RLIMIT_NLIMITS #define RLIMIT_NLIMITS __RLIMIT_NLIMITS #define RLIM_NLIMITS __RLIM_NLIMITS