Re: [PATCH net 1/4] umh: add exit routine for UMH process

From
Taehee Yoo <ap420073@gmail.com>
Date
2019-01-06 05:35:11
Also in
lkml
Reply to
David Miller, 2019-01-05
On Sun, 6 Jan 2019 at 07:10, David Miller [off-list ref] wrote:
From: Taehee Yoo <ap420073@gmail.com>
Date: Mon, 31 Dec 2018 01:31:43 +0900
quoted
+void exit_umh(struct task_struct *tsk)
+{
+     struct umh_info *info;
+     pid_t pid = tsk->pid;
+
+     mutex_lock(&umh_list_lock);
+     list_for_each_entry(info, &umh_list, list) {
Thank you for review!
So this is probably too expensive of a cost for every process exit.
The problem is that the cost will be taken even if the process is
not a UMH.
Yes, I agree with you.
I've taken my time to respond in hopes that I could come up with a
good alternative to suggest, but so far I don't have any better ideas.

I'll keep thinking about this some more, please let me know if you
have any ideas.
Thanks a lot for spending time to think about better ideas!
How about adding a new PF_UMH flag for task_struct->flags to identify
UMH process?
By using this flag, the exit_umh() can avoid unnecessary lookups.

Thanks again.
Thread (5 messages) 5 messages, 2 authors, last reply 2019-01-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help