Re: [RFC] [PATCH 00/13] Introduce task_pid api

From: Kyle Moffett
Date: Wed Nov 16 2005 - 14:36:56 EST

On Nov 13, 2005, at 10:22, Pavel Machek wrote:
@@ -2925,7 +2925,7 @@ void submit_bio(int rw, struct bio *bio)
if (unlikely(block_dump)) {
printk(KERN_DEBUG "%s(%d): %s block %Lu on %s\n",
- current->comm, current->pid,
+ current->comm, task_pid(current),
(rw & WRITE) ? "WRITE" : "READ",
(unsigned long long)bio->bi_sector,

...and now printk is close to useless, because uer can't know to which pidspace that pid belongs. Oops.

Uhh, this patch doesn't introduce any kind of virtualization yet. When that happens, _this_ code will remain the same (it wants the real pid), but *other* code will switch to use task_vpid(current) instead. This is an extremely literal translation of current->pid to task_pid(current), both of which do exactly the same thing.

Kyle Moffett

There is no way to make Linux robust with unreliable memory subsystems, sorry. It would be like trying to make a human more robust with an unreliable O2 supply. Memory just has to work.
-- Andi Kleen

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at