----- Original Message -----
Unfortunately I can't see a obvious way to remove the new
tc->tgid_context_index field...
Perhaps something like this...
Coming into get_task_mem_usage() function, you could get the
tgid of the incoming task by calling task_tgid().
Since the tgid_task_context[] array is sorted by tgid number,
perhaps a binary search of the array could quickly find
the associated entry (or one of the entries if multi-threaded)?
That shouldn't be a very time-consuming process.
Dave