From patchwork Fri Apr 6 09:02:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Antipov X-Patchwork-Id: 7687 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A0E2923ED2 for ; Fri, 6 Apr 2012 09:02:57 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 47FB6A18382 for ; Fri, 6 Apr 2012 09:02:57 +0000 (UTC) Received: by iage36 with SMTP id e36so3931448iag.11 for ; Fri, 06 Apr 2012 02:02:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=YWRmz/y12dziHXVB6qYIhP/Pwx0JIIIBkAmv8kJSUu0=; b=SvN5ONX2puHtHlojOe8hHCKRR37oepHL0Ev7ga8Sz1sgwQbjsMyVD2tKLVSV/6iZou wSUhbvtS0mTiawKe4l+qiyYMOaqBUDN+h54sDbAv4MTKMmgsygnybn1wTEojsgos2x6O rZQ2jUQ+SNTVt425dsjqOB4VPS8NK/uRXznK9Wdju074yyxgwOEexjnba6+SdfXHGFP2 O0J47T0ZVGVlG5+6Y3fNy6l9ulL4FhLBJIVAft9GNIbbnaAzy+sJ7Xfx2ArQn38Cx5Pq 15mN5L9tCsx4bWulM5odNEipH5RSUOJV0O9CUROuUjBRZGeO46Ti2FQQZwgXjIGfzp4D ox9w== Received: by 10.50.168.67 with SMTP id zu3mr4446355igb.28.1333702976260; Fri, 06 Apr 2012 02:02:56 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.164.217 with SMTP id f25csp141326iby; Fri, 6 Apr 2012 02:02:55 -0700 (PDT) Received: by 10.204.153.215 with SMTP id l23mr2771555bkw.11.1333702974440; Fri, 06 Apr 2012 02:02:54 -0700 (PDT) Received: from mail-bk0-f50.google.com (mail-bk0-f50.google.com [209.85.214.50]) by mx.google.com with ESMTPS id ul6si4183974bkb.119.2012.04.06.02.02.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 Apr 2012 02:02:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.50 is neither permitted nor denied by best guess record for domain of dmitry.antipov@linaro.org) client-ip=209.85.214.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.214.50 is neither permitted nor denied by best guess record for domain of dmitry.antipov@linaro.org) smtp.mail=dmitry.antipov@linaro.org Received: by bkuw11 with SMTP id w11so2515539bku.37 for ; Fri, 06 Apr 2012 02:02:53 -0700 (PDT) Received: by 10.204.136.198 with SMTP id s6mr2649706bkt.129.1333702973543; Fri, 06 Apr 2012 02:02:53 -0700 (PDT) Received: from localhost.localdomain ([78.153.153.8]) by mx.google.com with ESMTPS id r14sm13391097bkv.11.2012.04.06.02.02.51 (version=SSLv3 cipher=OTHER); Fri, 06 Apr 2012 02:02:52 -0700 (PDT) From: Dmitry Antipov To: mtk.manpages@gmail.com Cc: linux-man@vger.kernel.org, patches@linaro.org, linaro-dev@lists.linaro.org, Dmitry Antipov Subject: [PATCH] prctl.2, proc.5: proposal to reflect http://lwn.net/Articles/484162 Date: Fri, 6 Apr 2012 13:02:49 +0400 Message-Id: <1333702969-28795-1-git-send-email-dmitry.antipov@linaro.org> X-Mailer: git-send-email 1.7.7.6 X-Gm-Message-State: ALoCoQlDc+Vc6syYpDu6XF6153s8Q/qiLgKJSC0mSJ4ZWzdtzNg9Skmqdq7R+GxCFKIqbpaQ2+nb Document PR_GET_TIMERSLACK and PR_SET_TIMERSLACK for prctl (2). Document /proc/sys/kernel/timer_slack for proc (5). Signed-off-by: Dmitry Antipov --- man2/prctl.2 | 15 +++++++++++++++ man5/proc.5 | 4 ++++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/man2/prctl.2 b/man2/prctl.2 index effad2a..dcf803f 100644 --- a/man2/prctl.2 +++ b/man2/prctl.2 @@ -378,6 +378,21 @@ Return the current per-process machine check kill policy. All unused .BR prctl () arguments must be zero. +.TP +.BR PR_GET_TIMERSLACK " (since Linux 2.6.28)" +Return the current per-thread high-resolution timers slack, in nanoseconds. +.TP +.BR PR_SET_TIMERSLACK " (since Linux 2.6.28)" +Set the current per-thread high-resolution timers slack. If arg2 is less than or +equal to zero, system-wide default value is restored. The system-wide default can +be read and set by /proc/sys/kernel/timer_slack (see +.BR proc (5)). +Otherwise, if arg2 is less than or equal to HRTIMER_MAX_SLACK (which is a kernel +constant defined in include/linux/hrtimer.h), this value is set up as a new slack. +Slack is not inherited across +.BR fork (2); +new process initially uses system-wide default slack, and new thread inherits +it's slack from the group leader. .SH "RETURN VALUE" On success, .BR PR_GET_DUMPABLE , diff --git a/man5/proc.5 b/man5/proc.5 index 54ccdd8..0493b6b 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -2407,6 +2407,10 @@ date behind it indicates the time the kernel was built. This file specifies the system-wide limit on the number of threads (tasks) that can be created on the system. .TP +.IR /proc/sys/kernel/timer_slack +This file specifies the system-wide default slack for +high-resolution timers, in nanoseconds. +.TP .IR /proc/sys/kernel/zero-paged " (PowerPC only) " This file contains a flag.