HI Sangman, On Mon, Dec 13, 2010 at 3:31 PM, Sangman Kim <sangmank@xxxxxxxxxxxxx> wrote: > Hi Kernel people, > As I look at the kernel source, I got some curiosity regarding the context > of fdtable deallocation. > From fs/file.c, I could see fdtable allocated with vmalloc (large fdtable) > is deallocated in workqueue context. > But one thing I cannot understand is why vmalloc should be handled in such > context. > I thought it could be freed using vfree in the rcu call, but I believe there > should be a reason for doing this. I think its all tied in with the RCU stuff. When call_rcu is used, the function passed into it may be called from process context or softirq context. Since vfree MUST be called from process context, a work queue is used to ensure that it is in fact called from process context. I found this by reading some of the RCU documentation in the Documentation/RCU directory, most importantly, the whatisRCU.txt file. -- Dave Hylands Shuswap, BC, Canada http://www.DaveHylands.com/ -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ