On Jan 27, 2006, at 04:04, Eric W. Biederman wrote:
Basically my concern is that by using task structs internally the kernel will start collecting invisible zombies.
So come up with a task_struct weakref system. Maintain an (RCU?) linked list of struct task_weakref in the struct task_struct, and when the task struct is about to go away, run around all of the weakrefs and change their pointers to NULL. The user of the weakref should check if the pointer is NULL and handle accordingly. Sure, it would be tricky to get the locking right, but a couple extra bytes for a struct task_weakref would be a lot better than a whole pinned struct task_struct.
Cheers, Kyle Moffett --Somone asked me why I work on this free (http://www.fsf.org/ philosophy/) software stuff and not get a real job. Charles Schulz had the best answer:
"Why do musicians compose symphonies and poets write poems? They do it because life wouldn't have any meaning for them if they didn't. That's why I draw cartoons. It's my life."
-- Charles Schulz - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- References:
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Dave Hansen <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Greg KH <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Dave Hansen <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Hubertus Franke <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Kyle Moffett <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Arjan van de Ven <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Herbert Poetzl <[email protected]>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: [email protected] (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- Prev by Date: mprotect() resets caching policy
- Next by Date: Re: [PATCH 00/04] Add DSA key type
- Previous by thread: Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- Next by thread: Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- Index(es):