Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 28 Aug 2012 10:05:35 -0700 | Subject | Re: [PATCH -v12 02/15] resources: Add probe_resource() |
| |
On Tue, Aug 28, 2012 at 9:09 AM, Yinghai Lu <yinghai@kernel.org> wrote: > > please check update one. -v7
Ugh. Ok, looking closer at this, I think I agree with Bjorn. This is too ugly.
The whole "reduce size/needed_size by 1" double loop is O(n**2). And it does ugly "insert fake resource to check, and then remove it". Ugh.
Maybe this works in practice for the special case of some PCI bus numbers that are small integers, but the code is nasty nasty horrible and not a generic resource allocation thing.
Linus
| |