Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1159959

Re: [RFC PATCH 11/18] jffs2: Convert jffs2_gcd_mtd kthread into the iterant API

From Jiri Kosina <jkosina@suse.cz>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 11/18] jffs2: Convert jffs2_gcd_mtd kthread into the iterant API
Date 2015-06-06 23:40 +0200
Message-ID <pytYR-414-11@gated-at.bofh.it> (permalink)
References <py1pT-3Kb-3@gated-at.bofh.it> <py1pT-3Kb-21@gated-at.bofh.it> <pytFw-3E8-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 6 Jun 2015, Oleg Nesterov wrote:

> Still I personally dislike the new kthread_sigaction() API. I agree,
> a couple if signal helpers for kthreads make sense. Say,
> 
> 	void kthread_do_signal_stop(void)
> 	{
> 		spin_lock_irq(&curtent->sighand->siglock);
> 		if (current->jobctl & JOBCTL_STOP_DEQUEUED)
> 			__set_current_state(TASK_STOPPED);
> 		spin_unlock_irq(&current->sighand->siglock);
> 
> 		schedule();
> 	}

... not to mention the fact that 'STOP' keyword in relation to kthreads 
has completely different meaning today, which just contributes to overall 
confusion; but that's an independent story.

> 
> and probably even "int kthread_signal_deque(void)".
> 
> But personally I do not think kthread_do_signal() makes a lot of sense...

Would it be possible for you to elaborate a little bit more why you think 
so ... ?

I personally don't see a huge principal difference between 
"kthread_signal_dequeue() + kthread_do_signal_{stop,...}" vs. generic 
"kthread_do_signal()" that's just basically completely general and takes 
care of 'everything necessary'. That being said, my relationship to signal 
handling code is of course much less intimate compared to yours, so I am 
really curious what particular objections to that interface have.

Thanks a lot,

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH 11/18] jffs2: Convert jffs2_gcd_mtd kthread into  the iterant API Oleg Nesterov <oleg@redhat.com> - 2015-06-06 23:20 +0200
  Re: [RFC PATCH 11/18] jffs2: Convert jffs2_gcd_mtd kthread into the  iterant API Jiri Kosina <jkosina@suse.cz> - 2015-06-06 23:40 +0200
    Re: [RFC PATCH 11/18] jffs2: Convert jffs2_gcd_mtd kthread into  the iterant API Oleg Nesterov <oleg@redhat.com> - 2015-06-07 00:40 +0200
      Re: [RFC PATCH 11/18] jffs2: Convert jffs2_gcd_mtd kthread into the  iterant API Jiri Kosina <jkosina@suse.cz> - 2015-06-07 00:50 +0200
        Re: [RFC PATCH 11/18] jffs2: Convert jffs2_gcd_mtd kthread into  the iterant API Oleg Nesterov <oleg@redhat.com> - 2015-06-07 01:10 +0200

csiph-web