From: Naoaki Maeda <maeda.naoaki@jp.fujitsu.com>
To: Gerrit Huizenga <gh@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, ckrm-tech@lists.sourceforge.net,
Chandra Seetharaman <sekharan@us.ibm.com>,
Hubertus Franke <frankeh@us.ibm.com>,
Shailabh Nagar <nagar@us.ibm.com>
Subject: Re: [ckrm-tech] [patch 07/38] CKRM e18: Numtasks Controller
Date: Tue, 28 Jun 2005 14:54:01 +0900 [thread overview]
Message-ID: <42C0E5F9.50609@jp.fujitsu.com> (raw)
In-Reply-To: <20050623061755.520778000@w-gerrit.beaverton.ibm.com>
Gerrit Huizenga wrote:
> Index: linux-2.6.12-ckrm1/kernel/fork.c
> ===================================================================
> --- linux-2.6.12-ckrm1.orig/kernel/fork.c 2005-06-20 13:08:27.000000000 -0700
> +++ linux-2.6.12-ckrm1/kernel/fork.c 2005-06-20 13:08:34.000000000 -0700
> @@ -42,6 +42,8 @@
> #include <linux/rmap.h>
> #include <linux/acct.h>
> #include <linux/ckrm_events.h>
> +#include <linux/ckrm_tsk.h>
> +#include <linux/ckrm_tc.h>
>
> #include <asm/pgtable.h>
> #include <asm/pgalloc.h>
> @@ -1211,6 +1213,9 @@ long do_fork(unsigned long clone_flags,
> clone_flags |= CLONE_PTRACE;
> }
>
> + if (numtasks_get_ref(¤t->taskclass->core, 0) == 0) {
> + return -ENOMEM;
> + }
> p = copy_process(clone_flags, stack_start, regs, stack_size, parent_tidptr, child_tidptr, pid);
> /*
> * Do this prior waking up the new thread - the thread pointer
> @@ -1250,6 +1255,7 @@ long do_fork(unsigned long clone_flags,
> ptrace_notify ((PTRACE_EVENT_VFORK_DONE << 8) | SIGTRAP);
> }
> } else {
> + numtasks_put_ref(¤t->taskclass->core);
> free_pidmap(pid);
> pid = PTR_ERR(p);
> }
Instead of returning -ENOMEM on fork fail due to numtask or forkrate
limit, I'd rather prefer returning -EAGAIN.
Because, according to IEEE Std 1003.1, if fork() fails due to
reaching limit, it shall set the errno to EAGAIN.
Thanks,
MAEDA Naoaki
next prev parent reply other threads:[~2005-06-28 6:27 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-23 6:15 [patch 00/38] CKRM e18: Updated core patches to 2.6.12 and included e17 changes Gerrit Huizenga
2005-06-23 6:15 ` [patch 01/38] CKRM e18: Core CKRM Event Callbacks Gerrit Huizenga
2005-06-23 6:15 ` [patch 02/38] CKRM e18: Processor Delay Accounting Gerrit Huizenga
2005-06-23 9:16 ` Ingo Molnar
2005-06-23 9:37 ` Ingo Molnar
2005-06-23 17:55 ` [ckrm-tech] " Shailabh Nagar
2005-06-24 7:20 ` Ingo Molnar
2005-06-24 7:32 ` Gerrit Huizenga
2005-06-23 20:44 ` Gerrit Huizenga
2005-06-23 6:15 ` [patch 03/38] CKRM e18: Core infrastructure Gerrit Huizenga
2005-06-23 6:15 ` [patch 04/38] CKRM e18: Resource Control File System (rcfs) Gerrit Huizenga
2005-06-27 7:56 ` [ckrm-tech] " KUROSAWA Takahiro
2005-06-23 6:15 ` [patch 05/38] CKRM e18: Classtype definitions for task class Gerrit Huizenga
2005-06-23 6:15 ` [patch 06/38] CKRM e18: Classtype definitions for socket class Gerrit Huizenga
2005-06-23 6:15 ` [patch 07/38] CKRM e18: Numtasks Controller Gerrit Huizenga
2005-06-28 5:54 ` Naoaki Maeda [this message]
2005-06-23 6:16 ` [patch 08/38] CKRM e18: Documentation Gerrit Huizenga
2005-06-26 21:24 ` Pavel Machek
2005-06-27 18:45 ` Gerrit Huizenga
2005-06-27 20:56 ` Pavel Machek
2005-06-23 6:16 ` [patch 09/38] CKRM e18: Add missing read_unlock Gerrit Huizenga
2005-06-23 6:16 ` [patch 10/38] CKRM e18: Move Callbacks from listenaq to socketclass Gerrit Huizenga
2005-06-23 6:16 ` [patch 11/38] CKRM e18: Change ipaddr_port syntax Gerrit Huizenga
2005-06-23 6:16 ` [patch 12/38] CKRM e18: Check to see if my guarantee is set to DONTCARE Gerrit Huizenga
2005-06-23 6:16 ` [patch 13/38] CKRM e18: Minor cosmetic cleanups in numtasks controller Gerrit Huizenga
2005-06-23 6:16 ` [patch 14/38] CKRM e18: undo removal of check in numtasks_put_ref_local Gerrit Huizenga
2005-06-23 6:16 ` [patch 15/38] CKRM e18: Rule Based Classification Engine, stub rcfs support Gerrit Huizenga
2005-06-23 6:16 ` [patch 16/38] CKRM e18: Rule Based Classification Engine, basic " Gerrit Huizenga
2005-06-23 6:16 ` [patch 17/38] CKRM e18: Rule Based Classification Engine, bitvector support for classification info Gerrit Huizenga
2005-06-23 6:16 ` [patch 18/38] CKRM e18: Rule Based Classification Engine, full CE Gerrit Huizenga
2005-06-23 6:16 ` [patch 19/38] CKRM e18: Rule Based Classification Engine, more advanced classification engine Gerrit Huizenga
2005-06-23 6:16 ` [patch 20/38] CKRM e18: Clean up typo in printk message Gerrit Huizenga
2005-06-23 6:16 ` [patch 21/38] CKRM e18: Fix for compiler warnings Gerrit Huizenga
2005-06-23 6:16 ` [patch 22/38] CKRM e18: Fix share calculation Gerrit Huizenga
2005-06-23 6:16 ` [patch 23/38] CKRM e18: Fix edge cases with empty lists and rule deletion Gerrit Huizenga
2005-06-23 6:16 ` [patch 24/38] CKRM e18: Add numtasks controller config file write support Gerrit Huizenga
2005-06-23 6:16 ` [patch 25/38] CKRM e18: Add fork rate control to the numtasks controller Gerrit Huizenga
2005-06-27 7:07 ` [ckrm-tech] " Naoaki Maeda
2005-06-27 13:27 ` Rogier Wolff
2005-06-28 14:11 ` Naoaki Maeda
2005-06-27 18:08 ` Gerrit Huizenga
2005-06-28 14:21 ` Naoaki Maeda
2005-06-27 19:05 ` Chandra Seetharaman
2005-06-28 14:11 ` Naoaki Maeda
2005-06-23 6:16 ` [patch 26/38] CKRM e18: Classification Engines - RBCE and CRBCE are mutually exclusive Gerrit Huizenga
2005-06-23 6:16 ` [patch 27/38] CKRM e18: make get_class global Gerrit Huizenga
2005-06-23 6:16 ` [patch 28/38] CKRM e18: Cleanups to CKRM initialization Gerrit Huizenga
2005-06-23 6:16 ` [patch 29/38] CKRM e18: Replace target file interface with a writable members file Gerrit Huizenga
2005-06-23 6:16 ` [patch 30/38] CKRM e18: use sizeof instead of #define for the array size in taskclass Gerrit Huizenga
2005-06-23 6:16 ` [patch 31/38] CKRM e18: Fix a bug in the use of classtype Gerrit Huizenga
2005-06-23 6:16 ` [patch 32/38] CKRM e18: Include taskdelays.h in crbce.h Gerrit Huizenga
2005-06-23 6:16 ` [patch 33/38] CKRM e18: Send timestamps to userspace in msecs instead of jiffies Gerrit Huizenga
2005-06-23 6:16 ` [patch 34/38] CKRM e18: Fix compile warnings and delete dead code Gerrit Huizenga
2005-06-23 6:16 ` [patch 35/38] CKRM e18: Fix a NULL dereference bug Gerrit Huizenga
2005-06-23 6:16 ` [patch 36/38] CKRM e18: Classification Engine Configuration Support cleanup Gerrit Huizenga
2005-06-23 6:16 ` [patch 37/38] CKRM e18: Use sizeof instead of define for the array size in RBCE Gerrit Huizenga
2005-06-23 6:16 ` [patch 38/38] CKRM e18: Delete target file from tc_magic.c Gerrit Huizenga
2005-06-23 6:36 ` [ckrm-tech] [patch 00/38] CKRM e18: Updated core patches to 2.6.12 and included e17 changes Jean-Pierre Dion
2005-06-23 6:43 ` Gerrit Huizenga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42C0E5F9.50609@jp.fujitsu.com \
--to=maeda.naoaki@jp.fujitsu.com \
--cc=akpm@osdl.org \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=frankeh@us.ibm.com \
--cc=gh@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nagar@us.ibm.com \
--cc=sekharan@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox