Common Abstraction of Notification Completion Handling Mechanisms - observations and potential RFC

2001-01-17 Thread bsuparna
I have been looking at various notification and operation completion processing mechanisms that we currently have in the kernel. (The "operation" is typically I/O, but could be something else too). This comes about as a result of observing similar patterns in async i/o handling aspects in

[ANNOUNCE] Dynamic Probes 1.3 released

2001-01-17 Thread bsuparna
We've just released version 1.3 of the Dynamic Probes facility. This has 2.4.0 and 2.2.18 support and some bug fixes, including Andi Kleen's suggestions for fixing the races in handling of swapped out COW pages. For more information on DProbes see the dprobes homepage at

Re: [Kiobuf-io-devel] Re: [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1

2001-01-18 Thread bsuparna
Ok. Then we need an additional more or less generic object that is used for passing in a rw_kiovec file operation (and we really want that for many kinds of IO). I thould mostly be used for communicating to the high-level driver. /* * the name is just plain stupid, but that shouldn't matter

RFC: Kernel mechanism: Compound event wait/notify + callback chains

2001-01-29 Thread bsuparna
Comments, suggestions, advise, feedback solicited ! If this seems like something that might (after some refinements) be a useful abstraction to have, then I need some help in straightening out the design. I am not very satisfied with it in its current form. A Kernel Mechanism for Compound

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait/notify + callback chains

2001-01-30 Thread bsuparna
Ben, This indeed looks neat and simple ! I'd avoided touching the wait queue structure as I suspected that you might already have something like this in place :-) and was hoping that you'd see this posting and comment. I agree entirely that it makes sense to have chaining of events built over

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait/notify + callback chains

2001-01-31 Thread bsuparna
The waitqueue extension below is a minimalist approach for providing kernel support for fully asynchronous io. The basic idea is that a function pointer is added to the wait queue structure that is called during wake_up on a wait queue head. (The patch below also includes support for exclusive

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-01-31 Thread bsuparna
Hi, On Wed, Jan 31, 2001 at 07:28:01PM +0530, [EMAIL PROTECTED] wrote: Do the following modifications to your wait queue extension sound reasonable ? 1. Change add_wait_queue to add elements to the end of queue (fifo, by default) and instead have an add_wait_queue_lifo() routine that

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait/notify + callback chains

2001-01-31 Thread bsuparna
My first comment is that this looks very heavyweight indeed. Isn't it just over-engineered? Yes, I know it is, in its current form (sigh !). But at the same time, I do not want to give up (not yet, at least) on trying to arrive at something that can serve the objectives, and yet be simple in

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-01 Thread bsuparna
Here's a second pass attempt, based on Ben's wait queue extensions: Does this sound any better ? [This doesn't require any changes to the existing wait_queue_head based i/o structures or to existing drivers, and the constructs mentioned come into the picture only when compound events are

Re: [ANNOUNCE] DProbes 1.1

2000-10-24 Thread bsuparna
Hello Andi, Thanks for taking the trouble to go through our code in such detail and thinking through the race conditions in dp_vaddr_to_page, which I had sort of shut my eyes to and postponed for while because it didn't seem very easy to close all the loopholes in an elegant way. I need to

Re: [Dprobes] Re: [ANNOUNCE] DProbes 1.1: proposing a vm_ops-swapin() abstraction

2000-10-25 Thread bsuparna
Andi, Thanks. Then, I'll work it out in more detail and propose it on linux-mm as you've suggested. Maybe I should also try to think of another example where it might be useful. Anything that comes to mind ? Regards Suparna Suparna Bhattacharya Systems Software Group,

[ANNOUNCE] Dynamic Probes 2.0 released

2001-03-09 Thread bsuparna
Version 2.0 of the Dynamic Probes facility is now available at http://oss.software.ibm.com/developerworks/opensource/linux/projects/dprobes This release includes a new feature called "watchpoint probes" which exploits hardware watchpoint capabilities of the underlying hardware architecture to

Core dumps for threads: Request for your patch (hack)

2001-03-15 Thread bsuparna
(I have a complimentary hack that will dump the stacks of all the rest of the threads as well (though its a good trick to get gdb to interpret this). Available upon request.) Hello Adam, Could I take a look at your patch ? Regards Suparna Suparna Bhattacharya IBM Software Lab, India

Re: (struct dentry *)-vfsmnt;

2001-03-15 Thread bsuparna
Actually, I'm pretty sure you _never_ need to exportvg in order to have it work on another system. That's one of the great things about AIX LVM, because it means you can move a VG to another system after a hardware problem, and not have any problems importing it (journaled fs also helps).

Re: (struct dentry *)-vfsmnt;

2001-03-15 Thread bsuparna
Because this is totally filesystem specific - why put extra knowledge of filesystem internals into mount? I personally don't want it writing into the ext2 or ext3 superblock. How can it possibly know what to do, without embedding a lot of knowledge there? Yes, mount(8) can _read_ the UUID and

Oddness in i_shared_lock and page_table_lock nesting hierarchies ?

2000-11-04 Thread bsuparna
The vma list lock can nest with i_shared_lock, as per Kanoj Sarcar's note on mem-mgmt locks (Documentation/vm/locking), and currently vma list lock == mm-page_table_lock. But there appears to be some inconsistency in the hierarchy of these 2 locks. (By vma list lock I mean

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-01 Thread bsuparna
sct wrote: Thanks for mentioning this. I didn't know about it earlier. I've been going through the 4/00 kqueue patch on freebsd ... Linus has already denounced them as massively over-engineered... That shouldn't stop anyone from looking at them and learning, though. There might be a

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-01 Thread bsuparna
Hi, On Thu, Feb 01, 2001 at 10:25:22AM +0530, [EMAIL PROTECTED] wrote: We _do_ need the ability to stack completion events, but as far as the kiobuf work goes, my current thoughts are to do that by stacking lightweight "clone" kiobufs. Would that work with stackable filesystems ? Only if

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-02 Thread bsuparna
Hi, On Thu, Feb 01, 2001 at 01:28:33PM +0530, [EMAIL PROTECTED] wrote: Here's a second pass attempt, based on Ben's wait queue extensions: Does this sound any better ? It's a mechanism, all right, but you haven't described what problems it is trying to solve, and where it is likely to be

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-04 Thread bsuparna
Hi, On Fri, Feb 02, 2001 at 12:51:35PM +0100, Christoph Hellwig wrote: If I have a page vector with a single offset/length pair, I can build a new header with the same vector and modified offset/length to split the vector in two without copying it. You just say in the higher-level

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-05 Thread bsuparna
Hi, On Sun, Feb 04, 2001 at 06:54:58PM +0530, [EMAIL PROTECTED] wrote: Can't we define a kiobuf structure as just this ? A combination of a frag_list and a page_list ? Then all code which needs to accept an arbitrary kiobuf needs to be able to parse both --- ugh. Making this a little

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-06 Thread bsuparna
Hi, On Mon, Feb 05, 2001 at 08:01:45PM +0530, [EMAIL PROTECTED] wrote: It's the very essence of readahead that we wake up the earlier buffers as soon as they become available, without waiting for the later ones to complete, so we _need_ this multiple completion concept. I can understand

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait

2001-02-12 Thread bsuparna
Going through all the discussions once again and trying to look at this from the point of view of just basic requirements for data structures and mechanisms, that they imply. 1. Should have a data structure that represents a memory chain , which may not be contiguous in physical memory, and

Re: [Lse-tech] Re: [PATCH for 2.5] preemptible kernel

2001-04-09 Thread bsuparna
One question: isn't it the case that the alternative to using synchronize_kernel() is to protect the read side with explicit locks, which will themselves suppress preemption? If so, why not just suppress preemption on the read side in preemptible kernels, and thus gain the simpler

Common Abstraction of Notification & Completion Handling Mechanisms - observations and potential RFC

2001-01-17 Thread bsuparna
I have been looking at various notification and operation completion processing mechanisms that we currently have in the kernel. (The "operation" is typically I/O, but could be something else too). This comes about as a result of observing similar patterns in async i/o handling aspects in

[ANNOUNCE] Dynamic Probes 1.3 released

2001-01-17 Thread bsuparna
We've just released version 1.3 of the Dynamic Probes facility. This has 2.4.0 and 2.2.18 support and some bug fixes, including Andi Kleen's suggestions for fixing the races in handling of swapped out COW pages. For more information on DProbes see the dprobes homepage at

Re: [Kiobuf-io-devel] Re: [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1

2001-01-18 Thread bsuparna
>Ok. Then we need an additional more or less generic object that is used for >passing in a rw_kiovec file operation (and we really want that for many kinds >of IO). I thould mostly be used for communicating to the high-level driver. > >/* > * the name is just plain stupid, but that shouldn't

RFC: Kernel mechanism: Compound event wait/notify + callback chains

2001-01-29 Thread bsuparna
Comments, suggestions, advise, feedback solicited ! If this seems like something that might (after some refinements) be a useful abstraction to have, then I need some help in straightening out the design. I am not very satisfied with it in its current form. A Kernel Mechanism for Compound

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait/notify + callback chains

2001-01-30 Thread bsuparna
Ben, This indeed looks neat and simple ! I'd avoided touching the wait queue structure as I suspected that you might already have something like this in place :-) and was hoping that you'd see this posting and comment. I agree entirely that it makes sense to have chaining of events built over

Re: [Kiobuf-io-devel] Re: RFC: Kernel mechanism: Compound event wait/notify + callback chains

2001-01-31 Thread bsuparna
Mathew, Thanks for mentioning this. I didn't know about it earlier. I've been going through the 4/00 kqueue patch on freebsd ... Regards Suparna Suparna Bhattacharya Systems Software Group, IBM Global Services, India E-mail : [EMAIL PROTECTED] Phone : 91-80-5267117, Extn :

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait/notify + callback chains

2001-01-31 Thread bsuparna
>The waitqueue extension below is a minimalist approach for providing >kernel support for fully asynchronous io. The basic idea is that a >function pointer is added to the wait queue structure that is called >during wake_up on a wait queue head. (The patch below also includes >support for

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-01-31 Thread bsuparna
>Hi, > >On Wed, Jan 31, 2001 at 07:28:01PM +0530, [EMAIL PROTECTED] wrote: >> >> Do the following modifications to your wait queue extension sound >> reasonable ? >> >> 1. Change add_wait_queue to add elements to the end of queue (fifo, by >> default) and instead have an add_wait_queue_lifo()

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait/notify + callback chains

2001-01-31 Thread bsuparna
>My first comment is that this looks very heavyweight indeed. Isn't it >just over-engineered? Yes, I know it is, in its current form (sigh !). But at the same time, I do not want to give up (not yet, at least) on trying to arrive at something that can serve the objectives, and yet be simple

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-01 Thread bsuparna
Here's a second pass attempt, based on Ben's wait queue extensions: Does this sound any better ? [This doesn't require any changes to the existing wait_queue_head based i/o structures or to existing drivers, and the constructs mentioned come into the picture only when compound events are

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-01 Thread bsuparna
sct wrote: >> > >> > Thanks for mentioning this. I didn't know about it earlier. I've been >> > going through the 4/00 kqueue patch on freebsd ... >> >> Linus has already denounced them as massively over-engineered... > >That shouldn't stop anyone from looking at them and learning, though.

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-01 Thread bsuparna
>Hi, > >On Thu, Feb 01, 2001 at 10:25:22AM +0530, [EMAIL PROTECTED] wrote: >> >> >We _do_ need the ability to stack completion events, but as far as the >> >kiobuf work goes, my current thoughts are to do that by stacking >> >lightweight "clone" kiobufs. >> >> Would that work with stackable

[ANNOUNCE] Dynamic Probes 2.0 released

2001-03-09 Thread bsuparna
Version 2.0 of the Dynamic Probes facility is now available at http://oss.software.ibm.com/developerworks/opensource/linux/projects/dprobes This release includes a new feature called "watchpoint probes" which exploits hardware watchpoint capabilities of the underlying hardware architecture to

Core dumps for threads: Request for your patch (hack)

2001-03-15 Thread bsuparna
> >(I have a complimentary hack that will dump the stacks of all the >rest of the threads as well (though its a good trick to get gdb to >interpret this). Available upon request.) > Hello Adam, Could I take a look at your patch ? Regards Suparna Suparna Bhattacharya IBM Software Lab,

Re: (struct dentry *)->vfsmnt;

2001-03-15 Thread bsuparna
>Actually, I'm pretty sure you _never_ need to exportvg in order to have >it work on another system. That's one of the great things about AIX LVM, >because it means you can move a VG to another system after a hardware >problem, and not have any problems importing it (journaled fs also helps).

Re: (struct dentry *)->vfsmnt;

2001-03-15 Thread bsuparna
>Because this is totally filesystem specific - why put extra knowledge >of filesystem internals into mount? I personally don't want it writing >into the ext2 or ext3 superblock. How can it possibly know what to do, >without embedding a lot of knowledge there? Yes, mount(8) can _read_ >the

Re: [ANNOUNCE] DProbes 1.1

2000-10-24 Thread bsuparna
Hello Andi, Thanks for taking the trouble to go through our code in such detail and thinking through the race conditions in dp_vaddr_to_page, which I had sort of shut my eyes to and postponed for while because it didn't seem very easy to close all the loopholes in an elegant way. I need to

Re: [Dprobes] Re: [ANNOUNCE] DProbes 1.1: proposing a vm_ops->swapin() abstraction

2000-10-25 Thread bsuparna
Andi, Thanks. Then, I'll work it out in more detail and propose it on linux-mm as you've suggested. Maybe I should also try to think of another example where it might be useful. Anything that comes to mind ? Regards Suparna Suparna Bhattacharya Systems Software Group,

Oddness in i_shared_lock and page_table_lock nesting hierarchies ?

2000-11-04 Thread bsuparna
The vma list lock can nest with i_shared_lock, as per Kanoj Sarcar's note on mem-mgmt locks (Documentation/vm/locking), and currently vma list lock == mm->page_table_lock. But there appears to be some inconsistency in the hierarchy of these 2 locks. (By vma list lock I mean

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-02 Thread bsuparna
>Hi, > >On Thu, Feb 01, 2001 at 01:28:33PM +0530, [EMAIL PROTECTED] wrote: >> >> Here's a second pass attempt, based on Ben's wait queue extensions: > Does this sound any better ? > >It's a mechanism, all right, but you haven't described what problems >it is trying to solve, and where it is

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-04 Thread bsuparna
>Hi, > >On Fri, Feb 02, 2001 at 12:51:35PM +0100, Christoph Hellwig wrote: >> > >> > If I have a page vector with a single offset/length pair, I can build >> > a new header with the same vector and modified offset/length to split >> > the vector in two without copying it. >> >> You just say in

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-05 Thread bsuparna
>Hi, > >On Sun, Feb 04, 2001 at 06:54:58PM +0530, [EMAIL PROTECTED] wrote: >> >> Can't we define a kiobuf structure as just this ? A combination of a >> frag_list and a page_list ? > >Then all code which needs to accept an arbitrary kiobuf needs to be >able to parse both --- ugh. > Making

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains

2001-02-06 Thread bsuparna
>Hi, > >On Mon, Feb 05, 2001 at 08:01:45PM +0530, [EMAIL PROTECTED] wrote: >> >> >It's the very essence of readahead that we wake up the earlier buffers >> >as soon as they become available, without waiting for the later ones >> >to complete, so we _need_ this multiple completion concept. >> >>

Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait

2001-02-12 Thread bsuparna
Going through all the discussions once again and trying to look at this from the point of view of just basic requirements for data structures and mechanisms, that they imply. 1. Should have a data structure that represents a memory chain , which may not be contiguous in physical memory, and

Re: [Lse-tech] Re: [PATCH for 2.5] preemptible kernel

2001-04-09 Thread bsuparna
>One question: >isn't it the case that the alternative to using synchronize_kernel() >is to protect the read side with explicit locks, which will themselves >suppress preemption? If so, why not just suppress preemption on the read >side in preemptible kernels, and thus gain the simpler