All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: Richard Weinberger <richard@nod.at>,
	Steven Rostedt <rostedt@goodmis.org>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-mtd@lists.infradead.org,
	Trond Myklebust <trond.myklebust@primarydata.com>,
	Anna Schumaker <anna.schumaker@netapp.com>,
	linux-nfs@vger.kernel.org, Chris Mason <clm@fb.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jiri Kosina <jkosina@suse.cz>, Borislav Petkov <bp@suse.de>,
	Michal Hocko <mhocko@suse.cz>,
	live-patching@vger.kernel.org, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org, Petr Mladek <pmladek@suse.cz>
Subject: [RFC PATCH 12/18] lockd: Convert the central lockd service to kthread_iterant API
Date: Fri,  5 Jun 2015 17:01:11 +0200	[thread overview]
Message-ID: <1433516477-5153-13-git-send-email-pmladek@suse.cz> (raw)
In-Reply-To: <1433516477-5153-1-git-send-email-pmladek@suse.cz>

The new iterant kthread API allows to define a common checkpoint for
freezing, parking, termination, and even signal handling. It will allow
to maintain kthreads more easily and make the operations more reliable.

The kthread function is split into optional init(), func(), destroy() parts
where func() is called in a cycle. The common check point is after
each func() function finishes. See kthread_iterant_fn() for more details.

This patch moves the action associated with the signal into a proper
signal handler.

It removes the obsolete set_freezable() call because iterant kthreads
are freezable by default.

struct kthread_iterant is stored into struct svc_rqst. We have already
stored there the pointer to the related task_struct.

The rest is just shuffling the code from the while cycle into _func().

Signed-off-by: Petr Mladek <pmladek@suse.cz>
---
 fs/lockd/svc.c             | 80 ++++++++++++++++++++++++----------------------
 include/linux/sunrpc/svc.h |  2 ++
 2 files changed, 44 insertions(+), 38 deletions(-)

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 55505cbe11af..5b1efe509fcc 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -122,58 +122,55 @@ static void restart_grace(void)
 }
 
 /*
- * This is the lockd kernel thread
+ * Lockd kernel thread implementation using the iterant API
+ * We don't terminate until the last NFS mount or NFS daemon
+ * has gone away.
  */
-static int
-lockd(void *vrqstp)
+static void lockd_sigkill(int sig)
 {
-	int		err = 0;
-	struct svc_rqst *rqstp = vrqstp;
-
-	/* try_to_freeze() is called from svc_recv() */
-	set_freezable();
+	restart_grace();
+}
 
+static void lockd_init(void *vrqstp)
+{
 	/* Allow SIGKILL to tell lockd to drop all of its locks */
-	allow_signal(SIGKILL);
+	kthread_sigaction(SIGKILL, lockd_sigkill);
 
 	dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n");
+}
 
-	/*
-	 * The main request loop. We don't terminate until the last
-	 * NFS mount or NFS daemon has gone away.
-	 */
-	while (!kthread_should_stop()) {
-		long timeout = MAX_SCHEDULE_TIMEOUT;
-		RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
+static void lockd_func(void *vrqstp)
+{
+	int err = 0;
+	struct svc_rqst *rqstp = vrqstp;
 
-		/* update sv_maxconn if it has changed */
-		rqstp->rq_server->sv_maxconn = nlm_max_connections;
+	long timeout = MAX_SCHEDULE_TIMEOUT;
+	RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
 
-		if (signalled()) {
-			flush_signals(current);
-			restart_grace();
-			continue;
-		}
+	/* update sv_maxconn if it has changed */
+	rqstp->rq_server->sv_maxconn = nlm_max_connections;
 
-		timeout = nlmsvc_retry_blocked();
+	timeout = nlmsvc_retry_blocked();
 
-		/*
-		 * Find a socket with data available and call its
-		 * recvfrom routine.
-		 */
-		err = svc_recv(rqstp, timeout);
-		if (err == -EAGAIN || err == -EINTR)
-			continue;
-		dprintk("lockd: request from %s\n",
-				svc_print_addr(rqstp, buf, sizeof(buf)));
+	/*
+	 * Find a socket with data available and call its
+	 * recvfrom routine.
+	 */
+	err = svc_recv(rqstp, timeout);
+	if (err == -EAGAIN || err == -EINTR)
+		return;
 
-		svc_process(rqstp);
-	}
-	flush_signals(current);
+	dprintk("lockd: request from %s\n",
+		svc_print_addr(rqstp, buf, sizeof(buf)));
+
+	svc_process(rqstp);
+}
+
+static void lockd_destroy(void *vrqstp)
+{
 	if (nlmsvc_ops)
 		nlmsvc_invalidate_all();
 	nlm_shutdown_hosts();
-	return 0;
 }
 
 static int create_lockd_listener(struct svc_serv *serv, const char *name,
@@ -301,7 +298,14 @@ static int lockd_start_svc(struct svc_serv *serv)
 	svc_sock_update_bufs(serv);
 	serv->sv_maxconn = nlm_max_connections;
 
-	nlmsvc_task = kthread_create(lockd, nlmsvc_rqst, "%s", serv->sv_name);
+	nlmsvc_rqst->rq_kti.type = 0;
+	nlmsvc_rqst->rq_kti.data = nlmsvc_rqst;
+	nlmsvc_rqst->rq_kti.init = lockd_init;
+	nlmsvc_rqst->rq_kti.func = lockd_func;
+	nlmsvc_rqst->rq_kti.destroy = lockd_destroy;
+
+	nlmsvc_task = kthread_iterant_create(&nlmsvc_rqst->rq_kti,
+					     "%s", serv->sv_name);
 	if (IS_ERR(nlmsvc_task)) {
 		error = PTR_ERR(nlmsvc_task);
 		printk(KERN_WARNING
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index fae6fb947fc8..6275e9b9df9b 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -16,6 +16,7 @@
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/auth.h>
 #include <linux/sunrpc/svcauth.h>
+#include <linux/kthread.h>
 #include <linux/wait.h>
 #include <linux/mm.h>
 
@@ -283,6 +284,7 @@ struct svc_rqst {
 	struct auth_domain *	rq_client;	/* RPC peer info */
 	struct auth_domain *	rq_gssclient;	/* "gss/"-style peer info */
 	struct svc_cacherep *	rq_cacherep;	/* cache info */
+	struct kthread_iterant  rq_kti;		/* info for iterant kthread */
 	struct task_struct	*rq_task;	/* service thread */
 	spinlock_t		rq_lock;	/* per-request lock */
 };
-- 
1.8.5.6


WARNING: multiple messages have this Message-ID (diff)
From: Petr Mladek <pmladek-AlSwsSmVLrQ@public.gmane.org>
To: Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>,
	Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Trond Myklebust
	<trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>,
	Anna Schumaker
	<anna.schumaker-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Chris Mason <clm-b10kYP2dOMg@public.gmane.org>,
	"Paul E. McKenney"
	<paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>,
	Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org>,
	Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>,
	live-patching-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Petr Mladek <pmladek-AlSwsSmVLrQ@public.gmane.org>
Subject: [RFC PATCH 12/18] lockd: Convert the central lockd service to kthread_iterant API
Date: Fri,  5 Jun 2015 17:01:11 +0200	[thread overview]
Message-ID: <1433516477-5153-13-git-send-email-pmladek@suse.cz> (raw)
In-Reply-To: <1433516477-5153-1-git-send-email-pmladek-AlSwsSmVLrQ@public.gmane.org>

The new iterant kthread API allows to define a common checkpoint for
freezing, parking, termination, and even signal handling. It will allow
to maintain kthreads more easily and make the operations more reliable.

The kthread function is split into optional init(), func(), destroy() parts
where func() is called in a cycle. The common check point is after
each func() function finishes. See kthread_iterant_fn() for more details.

This patch moves the action associated with the signal into a proper
signal handler.

It removes the obsolete set_freezable() call because iterant kthreads
are freezable by default.

struct kthread_iterant is stored into struct svc_rqst. We have already
stored there the pointer to the related task_struct.

The rest is just shuffling the code from the while cycle into _func().

Signed-off-by: Petr Mladek <pmladek-AlSwsSmVLrQ@public.gmane.org>
---
 fs/lockd/svc.c             | 80 ++++++++++++++++++++++++----------------------
 include/linux/sunrpc/svc.h |  2 ++
 2 files changed, 44 insertions(+), 38 deletions(-)

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 55505cbe11af..5b1efe509fcc 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -122,58 +122,55 @@ static void restart_grace(void)
 }
 
 /*
- * This is the lockd kernel thread
+ * Lockd kernel thread implementation using the iterant API
+ * We don't terminate until the last NFS mount or NFS daemon
+ * has gone away.
  */
-static int
-lockd(void *vrqstp)
+static void lockd_sigkill(int sig)
 {
-	int		err = 0;
-	struct svc_rqst *rqstp = vrqstp;
-
-	/* try_to_freeze() is called from svc_recv() */
-	set_freezable();
+	restart_grace();
+}
 
+static void lockd_init(void *vrqstp)
+{
 	/* Allow SIGKILL to tell lockd to drop all of its locks */
-	allow_signal(SIGKILL);
+	kthread_sigaction(SIGKILL, lockd_sigkill);
 
 	dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n");
+}
 
-	/*
-	 * The main request loop. We don't terminate until the last
-	 * NFS mount or NFS daemon has gone away.
-	 */
-	while (!kthread_should_stop()) {
-		long timeout = MAX_SCHEDULE_TIMEOUT;
-		RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
+static void lockd_func(void *vrqstp)
+{
+	int err = 0;
+	struct svc_rqst *rqstp = vrqstp;
 
-		/* update sv_maxconn if it has changed */
-		rqstp->rq_server->sv_maxconn = nlm_max_connections;
+	long timeout = MAX_SCHEDULE_TIMEOUT;
+	RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
 
-		if (signalled()) {
-			flush_signals(current);
-			restart_grace();
-			continue;
-		}
+	/* update sv_maxconn if it has changed */
+	rqstp->rq_server->sv_maxconn = nlm_max_connections;
 
-		timeout = nlmsvc_retry_blocked();
+	timeout = nlmsvc_retry_blocked();
 
-		/*
-		 * Find a socket with data available and call its
-		 * recvfrom routine.
-		 */
-		err = svc_recv(rqstp, timeout);
-		if (err == -EAGAIN || err == -EINTR)
-			continue;
-		dprintk("lockd: request from %s\n",
-				svc_print_addr(rqstp, buf, sizeof(buf)));
+	/*
+	 * Find a socket with data available and call its
+	 * recvfrom routine.
+	 */
+	err = svc_recv(rqstp, timeout);
+	if (err == -EAGAIN || err == -EINTR)
+		return;
 
-		svc_process(rqstp);
-	}
-	flush_signals(current);
+	dprintk("lockd: request from %s\n",
+		svc_print_addr(rqstp, buf, sizeof(buf)));
+
+	svc_process(rqstp);
+}
+
+static void lockd_destroy(void *vrqstp)
+{
 	if (nlmsvc_ops)
 		nlmsvc_invalidate_all();
 	nlm_shutdown_hosts();
-	return 0;
 }
 
 static int create_lockd_listener(struct svc_serv *serv, const char *name,
@@ -301,7 +298,14 @@ static int lockd_start_svc(struct svc_serv *serv)
 	svc_sock_update_bufs(serv);
 	serv->sv_maxconn = nlm_max_connections;
 
-	nlmsvc_task = kthread_create(lockd, nlmsvc_rqst, "%s", serv->sv_name);
+	nlmsvc_rqst->rq_kti.type = 0;
+	nlmsvc_rqst->rq_kti.data = nlmsvc_rqst;
+	nlmsvc_rqst->rq_kti.init = lockd_init;
+	nlmsvc_rqst->rq_kti.func = lockd_func;
+	nlmsvc_rqst->rq_kti.destroy = lockd_destroy;
+
+	nlmsvc_task = kthread_iterant_create(&nlmsvc_rqst->rq_kti,
+					     "%s", serv->sv_name);
 	if (IS_ERR(nlmsvc_task)) {
 		error = PTR_ERR(nlmsvc_task);
 		printk(KERN_WARNING
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index fae6fb947fc8..6275e9b9df9b 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -16,6 +16,7 @@
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/auth.h>
 #include <linux/sunrpc/svcauth.h>
+#include <linux/kthread.h>
 #include <linux/wait.h>
 #include <linux/mm.h>
 
@@ -283,6 +284,7 @@ struct svc_rqst {
 	struct auth_domain *	rq_client;	/* RPC peer info */
 	struct auth_domain *	rq_gssclient;	/* "gss/"-style peer info */
 	struct svc_cacherep *	rq_cacherep;	/* cache info */
+	struct kthread_iterant  rq_kti;		/* info for iterant kthread */
 	struct task_struct	*rq_task;	/* service thread */
 	spinlock_t		rq_lock;	/* per-request lock */
 };
-- 
1.8.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Petr Mladek <pmladek@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: linux-nfs@vger.kernel.org, Borislav Petkov <bp@suse.de>,
	Jiri Kosina <jkosina@suse.cz>,
	Richard Weinberger <richard@nod.at>,
	Trond Myklebust <trond.myklebust@primarydata.com>,
	linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Michal Hocko <mhocko@suse.cz>, Chris Mason <clm@fb.com>,
	Petr Mladek <pmladek@suse.cz>,
	linux-mtd@lists.infradead.org, linux-api@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	live-patching@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Anna Schumaker <anna.schumaker@netapp.com>
Subject: [RFC PATCH 12/18] lockd: Convert the central lockd service to kthread_iterant API
Date: Fri,  5 Jun 2015 17:01:11 +0200	[thread overview]
Message-ID: <1433516477-5153-13-git-send-email-pmladek@suse.cz> (raw)
In-Reply-To: <1433516477-5153-1-git-send-email-pmladek@suse.cz>

The new iterant kthread API allows to define a common checkpoint for
freezing, parking, termination, and even signal handling. It will allow
to maintain kthreads more easily and make the operations more reliable.

The kthread function is split into optional init(), func(), destroy() parts
where func() is called in a cycle. The common check point is after
each func() function finishes. See kthread_iterant_fn() for more details.

This patch moves the action associated with the signal into a proper
signal handler.

It removes the obsolete set_freezable() call because iterant kthreads
are freezable by default.

struct kthread_iterant is stored into struct svc_rqst. We have already
stored there the pointer to the related task_struct.

The rest is just shuffling the code from the while cycle into _func().

Signed-off-by: Petr Mladek <pmladek@suse.cz>
---
 fs/lockd/svc.c             | 80 ++++++++++++++++++++++++----------------------
 include/linux/sunrpc/svc.h |  2 ++
 2 files changed, 44 insertions(+), 38 deletions(-)

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 55505cbe11af..5b1efe509fcc 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -122,58 +122,55 @@ static void restart_grace(void)
 }
 
 /*
- * This is the lockd kernel thread
+ * Lockd kernel thread implementation using the iterant API
+ * We don't terminate until the last NFS mount or NFS daemon
+ * has gone away.
  */
-static int
-lockd(void *vrqstp)
+static void lockd_sigkill(int sig)
 {
-	int		err = 0;
-	struct svc_rqst *rqstp = vrqstp;
-
-	/* try_to_freeze() is called from svc_recv() */
-	set_freezable();
+	restart_grace();
+}
 
+static void lockd_init(void *vrqstp)
+{
 	/* Allow SIGKILL to tell lockd to drop all of its locks */
-	allow_signal(SIGKILL);
+	kthread_sigaction(SIGKILL, lockd_sigkill);
 
 	dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n");
+}
 
-	/*
-	 * The main request loop. We don't terminate until the last
-	 * NFS mount or NFS daemon has gone away.
-	 */
-	while (!kthread_should_stop()) {
-		long timeout = MAX_SCHEDULE_TIMEOUT;
-		RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
+static void lockd_func(void *vrqstp)
+{
+	int err = 0;
+	struct svc_rqst *rqstp = vrqstp;
 
-		/* update sv_maxconn if it has changed */
-		rqstp->rq_server->sv_maxconn = nlm_max_connections;
+	long timeout = MAX_SCHEDULE_TIMEOUT;
+	RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
 
-		if (signalled()) {
-			flush_signals(current);
-			restart_grace();
-			continue;
-		}
+	/* update sv_maxconn if it has changed */
+	rqstp->rq_server->sv_maxconn = nlm_max_connections;
 
-		timeout = nlmsvc_retry_blocked();
+	timeout = nlmsvc_retry_blocked();
 
-		/*
-		 * Find a socket with data available and call its
-		 * recvfrom routine.
-		 */
-		err = svc_recv(rqstp, timeout);
-		if (err == -EAGAIN || err == -EINTR)
-			continue;
-		dprintk("lockd: request from %s\n",
-				svc_print_addr(rqstp, buf, sizeof(buf)));
+	/*
+	 * Find a socket with data available and call its
+	 * recvfrom routine.
+	 */
+	err = svc_recv(rqstp, timeout);
+	if (err == -EAGAIN || err == -EINTR)
+		return;
 
-		svc_process(rqstp);
-	}
-	flush_signals(current);
+	dprintk("lockd: request from %s\n",
+		svc_print_addr(rqstp, buf, sizeof(buf)));
+
+	svc_process(rqstp);
+}
+
+static void lockd_destroy(void *vrqstp)
+{
 	if (nlmsvc_ops)
 		nlmsvc_invalidate_all();
 	nlm_shutdown_hosts();
-	return 0;
 }
 
 static int create_lockd_listener(struct svc_serv *serv, const char *name,
@@ -301,7 +298,14 @@ static int lockd_start_svc(struct svc_serv *serv)
 	svc_sock_update_bufs(serv);
 	serv->sv_maxconn = nlm_max_connections;
 
-	nlmsvc_task = kthread_create(lockd, nlmsvc_rqst, "%s", serv->sv_name);
+	nlmsvc_rqst->rq_kti.type = 0;
+	nlmsvc_rqst->rq_kti.data = nlmsvc_rqst;
+	nlmsvc_rqst->rq_kti.init = lockd_init;
+	nlmsvc_rqst->rq_kti.func = lockd_func;
+	nlmsvc_rqst->rq_kti.destroy = lockd_destroy;
+
+	nlmsvc_task = kthread_iterant_create(&nlmsvc_rqst->rq_kti,
+					     "%s", serv->sv_name);
 	if (IS_ERR(nlmsvc_task)) {
 		error = PTR_ERR(nlmsvc_task);
 		printk(KERN_WARNING
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index fae6fb947fc8..6275e9b9df9b 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -16,6 +16,7 @@
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/auth.h>
 #include <linux/sunrpc/svcauth.h>
+#include <linux/kthread.h>
 #include <linux/wait.h>
 #include <linux/mm.h>
 
@@ -283,6 +284,7 @@ struct svc_rqst {
 	struct auth_domain *	rq_client;	/* RPC peer info */
 	struct auth_domain *	rq_gssclient;	/* "gss/"-style peer info */
 	struct svc_cacherep *	rq_cacherep;	/* cache info */
+	struct kthread_iterant  rq_kti;		/* info for iterant kthread */
 	struct task_struct	*rq_task;	/* service thread */
 	spinlock_t		rq_lock;	/* per-request lock */
 };
-- 
1.8.5.6

  parent reply	other threads:[~2015-06-05 15:02 UTC|newest]

Thread overview: 175+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 15:00 [RFC PATCH 00/18] kthreads/signal: Safer kthread API and signal handling Petr Mladek
2015-06-05 15:00 ` Petr Mladek
2015-06-05 15:00 ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 01/18] kthread: Allow to call __kthread_create_on_node() with va_list args Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 02/18] kthread: Add API for iterant kthreads Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-09  6:23   ` Tejun Heo
2015-06-09  6:23     ` Tejun Heo
2015-06-09  6:23     ` Tejun Heo
2015-06-15 12:46     ` Petr Mladek
2015-06-15 12:46       ` Petr Mladek
2015-06-15 12:46       ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 03/18] kthread: Add kthread_stop_current() Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 04/18] signal: Rename kernel_sigaction() to kthread_sigaction() and clean it up Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 05/18] freezer/scheduler: Add freezable_cond_resched() Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-06 21:58   ` Oleg Nesterov
2015-06-06 21:58     ` Oleg Nesterov
2015-06-06 21:58     ` Oleg Nesterov
2015-06-08 13:51     ` Petr Mladek
2015-06-08 13:51       ` Petr Mladek
2015-06-08 13:51       ` Petr Mladek
2015-06-08 21:13       ` Oleg Nesterov
2015-06-08 21:13         ` Oleg Nesterov
2015-06-08 21:13         ` Oleg Nesterov
2015-06-15 13:13         ` Petr Mladek
2015-06-15 13:13           ` Petr Mladek
2015-06-15 13:13           ` Petr Mladek
2015-06-15 19:14           ` Oleg Nesterov
2015-06-15 19:14             ` Oleg Nesterov
2015-06-15 19:14             ` Oleg Nesterov
2015-06-16  7:54             ` Petr Mladek
2015-06-16  7:54               ` Petr Mladek
2015-06-16  7:54               ` Petr Mladek
2015-06-09  7:10   ` Tejun Heo
2015-06-09  7:10     ` Tejun Heo
2015-06-09  7:10     ` Tejun Heo
2015-06-09 12:15     ` Jiri Kosina
2015-06-09 12:15       ` Jiri Kosina
2015-06-09 12:15       ` Jiri Kosina
2015-06-10  3:13       ` Tejun Heo
2015-06-10  3:13         ` Tejun Heo
2015-06-10  3:13         ` Tejun Heo
2015-06-05 15:01 ` [RFC PATCH 07/18] kthread: Make iterant kthreads freezable by default Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-09  7:20   ` Tejun Heo
2015-06-09  7:20     ` Tejun Heo
2015-06-09  7:20     ` Tejun Heo
2015-06-09 15:53     ` Petr Mladek
2015-06-09 15:53       ` Petr Mladek
2015-06-09 15:53       ` Petr Mladek
2015-06-10  4:31       ` Tejun Heo
2015-06-10  4:31         ` Tejun Heo
2015-06-10  4:31         ` Tejun Heo
2015-06-12 13:24         ` Petr Mladek
2015-06-12 13:24           ` Petr Mladek
2015-06-12 13:24           ` Petr Mladek
2015-06-13 23:22           ` Tejun Heo
2015-06-13 23:22             ` Tejun Heo
2015-06-13 23:22             ` Tejun Heo
2015-06-15  9:28             ` Petr Mladek
2015-06-15  9:28               ` Petr Mladek
2015-06-15  9:28               ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 08/18] kthread: Allow to get struct kthread_iterant from task_struct Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 09/18] kthread: Make it easier to correctly sleep in iterant kthreads Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 16:10   ` Peter Zijlstra
2015-06-05 16:10     ` Peter Zijlstra
2015-06-05 16:10     ` Peter Zijlstra
2015-06-08 10:01     ` Petr Mladek
2015-06-08 10:01       ` Petr Mladek
2015-06-08 10:01       ` Petr Mladek
2015-06-08 11:39       ` Peter Zijlstra
2015-06-08 11:39         ` Peter Zijlstra
2015-06-09 15:25         ` Petr Mladek
2015-06-09 15:25           ` Petr Mladek
2015-06-09 15:25           ` Petr Mladek
2015-06-10  9:05           ` Peter Zijlstra
2015-06-10  9:05             ` Peter Zijlstra
2015-06-10  9:05             ` Peter Zijlstra
2015-06-09  7:32       ` Tejun Heo
2015-06-09  7:32         ` Tejun Heo
2015-06-09  7:32         ` Tejun Heo
2015-06-08 17:48     ` Steven Rostedt
2015-06-08 17:48       ` Steven Rostedt
2015-06-08 17:48       ` Steven Rostedt
2015-06-10  9:07       ` Peter Zijlstra
2015-06-10  9:07         ` Peter Zijlstra
2015-06-10  9:07         ` Peter Zijlstra
2015-06-10 14:07         ` Steven Rostedt
2015-06-10 14:07           ` Steven Rostedt
2015-06-11  4:28           ` Jiri Kosina
2015-06-11  4:28             ` Jiri Kosina
2015-06-11  4:28             ` Jiri Kosina
2015-06-05 15:01 ` [RFC PATCH 10/18] jffs2: Remove forward definition of jffs2_garbage_collect_thread() Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 11/18] jffs2: Convert jffs2_gcd_mtd kthread into the iterant API Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-06 21:16   ` Oleg Nesterov
2015-06-06 21:16     ` Oleg Nesterov
2015-06-06 21:16     ` Oleg Nesterov
2015-06-06 21:32     ` Jiri Kosina
2015-06-06 21:32       ` Jiri Kosina
2015-06-06 21:32       ` Jiri Kosina
2015-06-06 22:30       ` Oleg Nesterov
2015-06-06 22:30         ` Oleg Nesterov
2015-06-06 22:30         ` Oleg Nesterov
2015-06-06 22:44         ` Jiri Kosina
2015-06-06 22:44           ` Jiri Kosina
2015-06-06 22:44           ` Jiri Kosina
2015-06-06 22:58           ` Oleg Nesterov
2015-06-06 22:58             ` Oleg Nesterov
2015-06-06 22:58             ` Oleg Nesterov
2015-06-05 15:01 ` Petr Mladek [this message]
2015-06-05 15:01   ` [RFC PATCH 12/18] lockd: Convert the central lockd service to kthread_iterant API Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 13/18] ring_buffer: Use iterant kthreads API in the ring buffer benchmark Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 14/18] ring_buffer: Allow to cleanly freeze the ring buffer benchmark kthreads Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 15/18] ring_buffer: Allow to exit the ring buffer benchmark immediately Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-08 17:44   ` Steven Rostedt
2015-06-08 17:44     ` Steven Rostedt
2015-06-08 17:44     ` Steven Rostedt
2015-06-15 15:23     ` Petr Mladek
2015-06-15 15:23       ` Petr Mladek
2015-06-15 15:23       ` Petr Mladek
2015-06-15 15:23       ` Petr Mladek
2015-06-15 15:33       ` Steven Rostedt
2015-06-15 15:33         ` Steven Rostedt
2015-06-15 15:33         ` Steven Rostedt
2015-06-15 15:54         ` Petr Mladek
2015-06-15 15:54           ` Petr Mladek
2015-06-15 15:54           ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 16/18] kthread: Support interruptible sleep with a timeout by iterant kthreads Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 17/18] ring_buffer: Use the new API for a sleep with a timeout in the benchmark Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 15:01 ` [RFC PATCH 18/18] jffs2: Use the new API for a sleep with a timeout Petr Mladek
2015-06-05 15:01   ` Petr Mladek
2015-06-05 16:22 ` [RFC PATCH 00/18] kthreads/signal: Safer kthread API and signal handling Peter Zijlstra
2015-06-05 16:22   ` Peter Zijlstra
2015-06-09  6:14   ` Tejun Heo
2015-06-09  6:14     ` Tejun Heo
2015-06-09  6:14     ` Tejun Heo
2015-06-10 10:40     ` Peter Zijlstra
2015-06-10 10:40       ` Peter Zijlstra
2015-06-10 10:40       ` Peter Zijlstra
2015-06-11 22:02       ` Tejun Heo
2015-06-11 22:02         ` Tejun Heo
2015-06-11 22:02         ` Tejun Heo
2015-06-09  6:10 ` Tejun Heo
2015-06-09  6:10   ` Tejun Heo
2015-06-09  6:10   ` Tejun Heo
2015-06-09  7:58   ` Tejun Heo
2015-06-09  7:58     ` Tejun Heo
2015-06-09  7:58     ` Tejun Heo
2015-06-17 11:34 ` Christoph Hellwig
2015-06-17 11:34   ` Christoph Hellwig
2015-06-17 11:34   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433516477-5153-13-git-send-email-pmladek@suse.cz \
    --to=pmladek@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=anna.schumaker@netapp.com \
    --cc=bp@suse.de \
    --cc=clm@fb.com \
    --cc=dwmw2@infradead.org \
    --cc=jkosina@suse.cz \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=richard@nod.at \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.