public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Suparna Bhattacharya <suparna@in.ibm.com>
To: linux-aio@kvack.org, linux-kernel@vger.kernel.org, akpm@osdl.org,
	wli@holomorphy.com
Subject: Re: [PATCH 4/6] Add default io wait bit field in task struct
Date: Wed, 3 Nov 2004 14:50:14 +0530	[thread overview]
Message-ID: <20041103092014.GD5737@in.ibm.com> (raw)
In-Reply-To: <20041103091036.GA4041@in.ibm.com>

On Wed, Nov 03, 2004 at 02:40:36PM +0530, Suparna Bhattacharya wrote:
> 
> The series of patches that follow integrate AIO with 
> William Lee Irwin's wait bit changes, to support asynchronous
> page waits.
> 
> [1] modify-wait-bit-action-args.patch
> 	Add a wait queue arg to the wait_bit action() routine
> 
> [2] lock_page_slow.patch
> 	Rename __lock_page to lock_page_slow
> 
> [3] init-wait-bit-key.patch
> 	Interfaces to init and to test wait bit key
> 
> [4] tsk-default-io-wait.patch
> 	Add default io wait bit field in task struct
> 

-- 
Suparna Bhattacharya (suparna@in.ibm.com)
Linux Technology Center
IBM Software Lab, India

--------------------------------------------------------


Allocates space for the default io wait queue entry (actually a wait
bit entry) in the task struct. Doing so simplifies the patches 
for AIO wait page allowing for cleaner and more efficient 
implementation, at the cost of 28 additional bytes in task struct
vs allocation on demand on-stack.

Thanks to Vatsa for helping debug and fix a problem with wait bit
initializtion.

Signed-off-by: Suparna Bhattacharya <suparna@in.ibm.com>

diff -puN include/linux/sched.h~tsk-default-io-wait include/linux/sched.h


 linux-2.6.10-rc1-suparna/include/linux/sched.h |   11 +++++++----
 linux-2.6.10-rc1-suparna/kernel/fork.c         |    3 ++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff -puN include/linux/sched.h~tsk-default-io-wait include/linux/sched.h
--- linux-2.6.10-rc1/include/linux/sched.h~tsk-default-io-wait	2004-11-03 14:35:13.000000000 +0530
+++ linux-2.6.10-rc1-suparna/include/linux/sched.h	2004-11-03 14:35:13.000000000 +0530
@@ -652,11 +652,14 @@ struct task_struct {
 
 	unsigned long ptrace_message;
 	siginfo_t *last_siginfo; /* For ptrace use.  */
+
+/* Space for default IO wait bit entry used for synchronous IO waits */
+	struct wait_bit_queue __wait;
 /*
- * current io wait handle: wait queue entry to use for io waits
- * If this thread is processing aio, this points at the waitqueue
- * inside the currently handled kiocb. It may be NULL (i.e. default
- * to a stack based synchronous wait) if its doing sync IO.
+ * Current IO wait handle: wait queue entry to use for IO waits
+ * If this thread is processing AIO, this points at the waitqueue
+ * inside the currently handled kiocb. Otherwise, points to the
+ * default IO wait field (i.e &__wait.wait above).
  */
 	wait_queue_t *io_wait;
 #ifdef CONFIG_NUMA
diff -puN kernel/fork.c~tsk-default-io-wait kernel/fork.c
--- linux-2.6.10-rc1/kernel/fork.c~tsk-default-io-wait	2004-11-03 14:35:13.000000000 +0530
+++ linux-2.6.10-rc1-suparna/kernel/fork.c	2004-11-03 14:35:13.000000000 +0530
@@ -870,7 +870,8 @@ static task_t *copy_process(unsigned lon
 	do_posix_clock_monotonic_gettime(&p->start_time);
 	p->security = NULL;
 	p->io_context = NULL;
-	p->io_wait = NULL;
+	init_wait_bit_task(&p->__wait, p);
+	p->io_wait = &p->__wait.wait;
 	p->audit_context = NULL;
 #ifdef CONFIG_NUMA
  	p->mempolicy = mpol_copy(p->mempolicy);

_

  parent reply	other threads:[~2004-11-03  9:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-03  9:10 [PATCH 0/6] AIO wait bit support Suparna Bhattacharya
2004-11-03  9:13 ` [PATCH 1/6] Add a wait queue arg to the wait_bit action() routine Suparna Bhattacharya
2004-11-03  9:14 ` [PATCH 2/6] Rename __lock_page to lock_page_slow Suparna Bhattacharya
2004-11-03  9:15 ` [PATCH 3/6] Interfaces to init and to test wait bit key Suparna Bhattacharya
2004-11-03  9:20 ` Suparna Bhattacharya [this message]
2004-11-03  9:22 ` [PATCH 5/6] AIO wake bit and AIO wait bit Suparna Bhattacharya
2004-11-03  9:23 ` [PATCH 6/6] AIO wait page and AIO lock page Suparna Bhattacharya
2004-11-03  9:32   ` Suparna Bhattacharya
2004-11-03  9:23 ` [PATCH 0/6] AIO wait bit support William Lee Irwin III
2004-11-04  5:00   ` Suparna Bhattacharya
  -- strict thread matches above, loose matches on Subject: below --
2005-06-20 12:01 Pending AIO work/patches Suparna Bhattacharya
2005-06-20 16:01 ` [PATCH 0/6] Integrate AIO with wait-bit based filtered wakeups Suparna Bhattacharya
2005-06-20 16:30   ` [PATCH 4/6] Add default io wait bit field in task struct Suparna Bhattacharya

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=20041103092014.GD5737@in.ibm.com \
    --to=suparna@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox