Subject: Kernel Thread's accounted to a User Context
From: Eric Keller <ekeller@Princeton.EDU>
Date: Fri, 30 Nov 2007 11:09:40 -0500

What I'm trying to do is to run a kernel thread, but have it associated 
with a particular user's context.  The reason is this - I want to run 
Click in the kernel, but allow each user to provide their own click 
graph.  The root context will manage the whole process, performing 
checks, then merging the various click graphs into a single click graph, 
and installing that in the kernel.  Each user graph would be run within 
their own kernel thread.

I've looked through the vserver code and before I start doing any 
modifications, I wanted to post to the group to see if anyone has any 
guidance.  It appears that include/linux/vs_context.h provides all of 
the functionality I'd need.  So I would start the kernel thread as 
usual, then I would transfer it (by changing vx_info and xid, from 
task_struct) from the kernel's vx_info to a particular user context's 
vx_info (I would get the vx_info with lookup_vx_info(xid)).

Does that sound right, or where should I be looking?

Thanks,
Eric Keller