Re: [PATCH] unified device list allocator

2005-03-07 Thread Matt Mackall
On Tue, Mar 08, 2005 at 06:31:27AM +, Christoph Hellwig wrote: > On Mon, Mar 07, 2005 at 10:11:55PM -0800, Matt Mackall wrote: > > > - when called with the major argument as 0 it returns an unused major > > > number > > >from the top of the old 255 entries major list. This should be >

Re: [PATCH] unified device list allocator

2005-03-07 Thread Christoph Hellwig
On Mon, Mar 07, 2005 at 10:11:55PM -0800, Matt Mackall wrote: > > - when called with the major argument as 0 it returns an unused major > > number > >from the top of the old 255 entries major list. This should be replaced > >by a real dynamic dev_t allocator, similar to

Re: [PATCH] unified device list allocator

2005-03-07 Thread Matt Mackall
On Tue, Mar 08, 2005 at 05:56:27AM +, Christoph Hellwig wrote: > On Mon, Mar 07, 2005 at 09:50:35PM -0800, Andrew Morton wrote: > > > register_blkdev only happens at module_init time (and in fact should go > > > away completely, so I'm not happy wit hthe surgey to keep it barely alive > > > at

Re: [PATCH] unified device list allocator

2005-03-07 Thread Matt Mackall
On Mon, Mar 07, 2005 at 09:33:02PM -0800, Andrew Morton wrote: > Matt Mackall <[EMAIL PROTECTED]> wrote: > > > > + /* search for insertion point in reverse for dynamic allocation */ > > + list_for_each_prev(l, list) { > > hrmph. Any time we do anything in O(n) time, some smarty comes along

Re: [PATCH] unified device list allocator

2005-03-07 Thread Christoph Hellwig
On Mon, Mar 07, 2005 at 09:50:35PM -0800, Andrew Morton wrote: > > register_blkdev only happens at module_init time (and in fact should go > > away completely, so I'm not happy wit hthe surgey to keep it barely alive > > at all) > > Is anyone working on that? I had a patch from a long time ago

Re: [PATCH] unified device list allocator

2005-03-07 Thread Andrew Morton
Christoph Hellwig <[EMAIL PROTECTED]> wrote: > > On Mon, Mar 07, 2005 at 09:33:02PM -0800, Andrew Morton wrote: > > Matt Mackall <[EMAIL PROTECTED]> wrote: > > > > > > + /* search for insertion point in reverse for dynamic allocation */ > > > +list_for_each_prev(l, list) { > > > > hrmph.

Re: [PATCH] unified device list allocator

2005-03-07 Thread Christoph Hellwig
On Mon, Mar 07, 2005 at 09:33:02PM -0800, Andrew Morton wrote: > Matt Mackall <[EMAIL PROTECTED]> wrote: > > > > + /* search for insertion point in reverse for dynamic allocation */ > > + list_for_each_prev(l, list) { > > hrmph. Any time we do anything in O(n) time, some smarty comes along

Re: [PATCH] unified device list allocator

2005-03-07 Thread Andrew Morton
Matt Mackall <[EMAIL PROTECTED]> wrote: > > + /* search for insertion point in reverse for dynamic allocation */ > +list_for_each_prev(l, list) { hrmph. Any time we do anything in O(n) time, some smarty comes along with a workload which blows us out of the water. Although it's hard to

[PATCH] unified device list allocator

2005-03-07 Thread Matt Mackall
(This patch is against -mm1, which has different locking than mainline) This patch introduces a simple allocator for tracking reservations of block and character device ranges. After poking around, I came to the conclusion that we can't avoid having a separate data structure for reservations vs

[PATCH] unified device list allocator

2005-03-07 Thread Matt Mackall
(This patch is against -mm1, which has different locking than mainline) This patch introduces a simple allocator for tracking reservations of block and character device ranges. After poking around, I came to the conclusion that we can't avoid having a separate data structure for reservations vs

Re: [PATCH] unified device list allocator

2005-03-07 Thread Andrew Morton
Matt Mackall [EMAIL PROTECTED] wrote: + /* search for insertion point in reverse for dynamic allocation */ +list_for_each_prev(l, list) { hrmph. Any time we do anything in O(n) time, some smarty comes along with a workload which blows us out of the water. Although it's hard to think

Re: [PATCH] unified device list allocator

2005-03-07 Thread Christoph Hellwig
On Mon, Mar 07, 2005 at 09:33:02PM -0800, Andrew Morton wrote: Matt Mackall [EMAIL PROTECTED] wrote: + /* search for insertion point in reverse for dynamic allocation */ + list_for_each_prev(l, list) { hrmph. Any time we do anything in O(n) time, some smarty comes along with a

Re: [PATCH] unified device list allocator

2005-03-07 Thread Andrew Morton
Christoph Hellwig [EMAIL PROTECTED] wrote: On Mon, Mar 07, 2005 at 09:33:02PM -0800, Andrew Morton wrote: Matt Mackall [EMAIL PROTECTED] wrote: + /* search for insertion point in reverse for dynamic allocation */ +list_for_each_prev(l, list) { hrmph. Any time we do

Re: [PATCH] unified device list allocator

2005-03-07 Thread Christoph Hellwig
On Mon, Mar 07, 2005 at 09:50:35PM -0800, Andrew Morton wrote: register_blkdev only happens at module_init time (and in fact should go away completely, so I'm not happy wit hthe surgey to keep it barely alive at all) Is anyone working on that? I had a patch from a long time ago that just

Re: [PATCH] unified device list allocator

2005-03-07 Thread Matt Mackall
On Mon, Mar 07, 2005 at 09:33:02PM -0800, Andrew Morton wrote: Matt Mackall [EMAIL PROTECTED] wrote: + /* search for insertion point in reverse for dynamic allocation */ + list_for_each_prev(l, list) { hrmph. Any time we do anything in O(n) time, some smarty comes along with a

Re: [PATCH] unified device list allocator

2005-03-07 Thread Matt Mackall
On Tue, Mar 08, 2005 at 05:56:27AM +, Christoph Hellwig wrote: On Mon, Mar 07, 2005 at 09:50:35PM -0800, Andrew Morton wrote: register_blkdev only happens at module_init time (and in fact should go away completely, so I'm not happy wit hthe surgey to keep it barely alive at all)

Re: [PATCH] unified device list allocator

2005-03-07 Thread Christoph Hellwig
On Mon, Mar 07, 2005 at 10:11:55PM -0800, Matt Mackall wrote: - when called with the major argument as 0 it returns an unused major number from the top of the old 255 entries major list. This should be replaced by a real dynamic dev_t allocator, similar to alloc_chrdev_region.

Re: [PATCH] unified device list allocator

2005-03-07 Thread Matt Mackall
On Tue, Mar 08, 2005 at 06:31:27AM +, Christoph Hellwig wrote: On Mon, Mar 07, 2005 at 10:11:55PM -0800, Matt Mackall wrote: - when called with the major argument as 0 it returns an unused major number from the top of the old 255 entries major list. This should be replaced