Re: RFC [patch 13/34] PID Virtualization Define new task_pid api



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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [PATCH 2/3] kernel-doc: print arrays in declarations correctly.
    ... Do not convert arrays into pointers while generating documentation for them. ... struct sk_buff { ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [BK PATCH] USB update for 2.6.3
    ... > pointers attached to the struct device inherited from the bus ... platform-specific pointer to whatever data structure that platform needs ... pointers wouldn't have any function pointers there, ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • [patch 8/8] ide-scsi: add basic refcounting
    ... * pointers to a SCSI host and a drive are added to idescsi_scsi_t ... add driver's private struct gendisk ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Simple question, err... I think
    ... Your nodes contain no other indication of which pointers are valid, ... struct CountedObject ... int is_red; ... bool lament(char const s) ...
    (comp.programming)
  • Re: porting problems encountered
    ... Tru64 compiles long variables to size 8 bytes while VMS and HP-UX ... platform, the size of the structure would be 12 bytes. ... when it got to the AS/400 with 128 bit pointers. ... Using the struct from before: ...
    (comp.os.vms)