From: William Lee Irwin III <wli@holomorphy.com>
To: Kirill Korotaev <kksx@mail.ru>
Cc: akpm@osdl.org, torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: [6/7] back out renaming of ->pid_chain
Date: Wed, 1 Sep 2004 10:35:29 -0700 [thread overview]
Message-ID: <20040901173529.GJ5492@holomorphy.com> (raw)
In-Reply-To: <20040901173327.GI5492@holomorphy.com>
On Wed, Sep 01, 2004 at 10:33:27AM -0700, William Lee Irwin III wrote:
> The renaming of struct pid was spurious; the following patch backs out
> this renaming.
The renaming of ->pid_chain was spurious; the following patch backs it out.
Index: kirill-2.6.9-rc1-mm2/include/linux/pid.h
===================================================================
--- kirill-2.6.9-rc1-mm2.orig/include/linux/pid.h 2004-09-01 09:28:48.595832976 -0700
+++ kirill-2.6.9-rc1-mm2/include/linux/pid.h 2004-09-01 10:13:28.949357304 -0700
@@ -12,9 +12,9 @@
struct pid
{
- /* Try to keep hash_list in the same cacheline as nr for find_pid */
+ /* Try to keep pid_chain in the same cacheline as nr for find_pid */
int nr;
- struct hlist_node hash_list;
+ struct hlist_node pid_chain;
/* list of pids with the same nr, only one of them is in the hash */
struct list_head pid_list;
};
Index: kirill-2.6.9-rc1-mm2/kernel/pid.c
===================================================================
--- kirill-2.6.9-rc1-mm2.orig/kernel/pid.c 2004-09-01 09:31:25.972908024 -0700
+++ kirill-2.6.9-rc1-mm2/kernel/pid.c 2004-09-01 10:16:27.524209800 -0700
@@ -154,7 +154,7 @@
struct pid *pid;
hlist_for_each_entry(pid, elem,
- &pid_hash[type][pid_hashfn(nr)], hash_list) {
+ &pid_hash[type][pid_hashfn(nr)], pid_chain) {
if (pid->nr == nr)
return pid;
}
@@ -168,11 +168,11 @@
task_pid = &task->pids[type];
pid = find_pid(type, nr);
if (pid == NULL) {
- hlist_add_head(&task_pid->hash_list,
+ hlist_add_head(&task_pid->pid_chain,
&pid_hash[type][pid_hashfn(nr)]);
INIT_LIST_HEAD(&task_pid->pid_list);
} else {
- INIT_HLIST_NODE(&task_pid->hash_list);
+ INIT_HLIST_NODE(&task_pid->pid_chain);
list_add_tail(&task_pid->pid_list, &pid->pid_list);
}
task_pid->nr = nr;
@@ -186,13 +186,13 @@
int nr;
pid = &task->pids[type];
- if (!hlist_unhashed(&pid->hash_list)) {
- hlist_del(&pid->hash_list);
+ if (!hlist_unhashed(&pid->pid_chain)) {
+ hlist_del(&pid->pid_chain);
if (!list_empty(&pid->pid_list)) {
pid_next = list_entry(pid->pid_list.next,
struct pid, pid_list);
/* insert next pid from pid_list to hash */
- hlist_add_head(&pid_next->hash_list,
+ hlist_add_head(&pid_next->pid_chain,
&pid_hash[type][pid_hashfn(pid_next->nr)]);
}
}
next prev parent reply other threads:[~2004-09-01 17:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-01 11:46 [PATCH] obscure pid implementation fix (v2) Kirill Korotaev
2004-09-01 15:36 ` William Lee Irwin III
2004-09-01 15:38 ` William Lee Irwin III
2004-09-01 16:58 ` William Lee Irwin III
2004-09-01 17:27 ` [1/7] make do_each_task_pid()/while_each_task_pid() typecheck William Lee Irwin III
2004-09-01 17:28 ` [2/7] make do_each_task_pid()/while_each_task_pid() require a semicolon following them William Lee Irwin III
2004-09-01 17:30 ` [3/7] make do_each_task_pid()/while_each_task_pid() parenthesize their arguments William Lee Irwin III
2004-09-01 17:32 ` [4/7] fix loop termination condition in do_each_task_pid()/while_each_task_pid() William Lee Irwin III
2004-09-01 17:33 ` [5/7] back out renaming of struct pid William Lee Irwin III
2004-09-01 17:35 ` William Lee Irwin III [this message]
2004-09-01 17:37 ` [7/7] remove casting of __detach_pid() results to void William Lee Irwin III
2004-09-01 17:48 ` [1/7] make do_each_task_pid()/while_each_task_pid() typecheck Linus Torvalds
2004-09-01 17:59 ` [1/1] rework of Kirill Korotaev's pidhashing patch William Lee Irwin III
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=20040901173529.GJ5492@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=kksx@mail.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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