Prev: [PATCH 8/8] staging: vt6656: tcrc.c: Fixed coding style issues
Next: [PATCH 0/2] perf: Use LBR for machine/oops debugging
From: Benjamin Herrenschmidt on 29 Mar 2010 19:40 On Mon, 2010-03-29 at 15:37 -0700, Yinghai Lu wrote: > > We just need a lmb.alloc_limit and a lmb_set_alloc_limit() which arch > > code calls when it knows what the alloc limit is (and can call multiple > > times during boot). Or maybe it should be called "default_alloc_limit", > > but that's getting a bit long winded. > > ok, I will get_max_mapped() for now, an will change to new field...later No. Do it now. get_max_mapped() sucks as an identifier. Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Yinghai Lu on 29 Mar 2010 20:00 On 03/29/2010 04:34 PM, Benjamin Herrenschmidt wrote: > On Mon, 2010-03-29 at 15:37 -0700, Yinghai Lu wrote: >>> We just need a lmb.alloc_limit and a lmb_set_alloc_limit() which arch >>> code calls when it knows what the alloc limit is (and can call multiple >>> times during boot). Or maybe it should be called "default_alloc_limit", >>> but that's getting a bit long winded. >> >> ok, I will get_max_mapped() for now, an will change to new field...later > > No. Do it now. get_max_mapped() sucks as an identifier. > ok, can i reuse rmo_size, or introduce one new member in struct lmb. default_limit? Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Yinghai Lu on 29 Mar 2010 20:10 On 03/29/2010 04:31 PM, Benjamin Herrenschmidt wrote: > On Tue, 2010-03-30 at 09:20 +1100, Michael Ellerman wrote: >> >> But that's my point. You shouldn't need to touch the existing API, and >> you shouldn't need to add a new parallel API. You should just be able to >> add the logic for doubling the array in the lmb core, and then everyone >> gets dynamically expandable lmb. I don't see any reason why we want to >> have two APIs. > > Ack. ok, we can merge them later. > >>>> It seems to me that rather than adding these "special" routines that >>>> check for enough space on the way in, instead you should be checking in >>>> lmb_add_region() - which is where AFAICS all allocs/frees/reserves >>>> eventually end up if they need to insert a new region. >>> >>> later i prefer to replace lmb_alloc with find_lmb_area + reserve_lmb. >> >> Why? The existing code has been working for years and is well tested? > > I still don't totally understand why he needs a find_lmb_area() > anyways. > > It might be justified ... or not. I just want it to be better > documented. current changelog for that ------------------ Subject: [PATCH 6/31] lmb: Add lmb_find_area() It will try find area according with size/align in specified range (start, end). Need use it find correct buffer for new lmb.reserved.region. also make it more easy for x86 to use lmb. x86 early_res is using find/reserve pattern instead of alloc. lmb_find_area() will honor goal When we need temporary buff for range array etc for range work, if We are using lmb_alloc(), We will need to add some post fix code for buffer that is used by range array, because it is in the lmb.reserved already. ---------------- in short: It could make us to avoid use the range that we are going to reserve, when we try to get new position new lmb.reserved.region. Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Michael Ellerman on 30 Mar 2010 00:20 On Mon, 2010-03-29 at 16:53 -0700, Yinghai Lu wrote: > On 03/29/2010 04:34 PM, Benjamin Herrenschmidt wrote: > > On Mon, 2010-03-29 at 15:37 -0700, Yinghai Lu wrote: > >>> We just need a lmb.alloc_limit and a lmb_set_alloc_limit() which arch > >>> code calls when it knows what the alloc limit is (and can call multiple > >>> times during boot). Or maybe it should be called "default_alloc_limit", > >>> but that's getting a bit long winded. > >> > >> ok, I will get_max_mapped() for now, an will change to new field...later > > > > No. Do it now. get_max_mapped() sucks as an identifier. > > > > ok, can i reuse rmo_size, or introduce one new member in struct lmb. > > default_limit? alloc_limit or default_alloc_limit cheers
From: Yinghai Lu on 30 Mar 2010 00:30 On 03/29/2010 09:13 PM, Michael Ellerman wrote: > On Mon, 2010-03-29 at 16:53 -0700, Yinghai Lu wrote: >> On 03/29/2010 04:34 PM, Benjamin Herrenschmidt wrote: >>> On Mon, 2010-03-29 at 15:37 -0700, Yinghai Lu wrote: >>>>> We just need a lmb.alloc_limit and a lmb_set_alloc_limit() which arch >>>>> code calls when it knows what the alloc limit is (and can call multiple >>>>> times during boot). Or maybe it should be called "default_alloc_limit", >>>>> but that's getting a bit long winded. >>>> >>>> ok, I will get_max_mapped() for now, an will change to new field...later >>> >>> No. Do it now. get_max_mapped() sucks as an identifier. >>> >> >> ok, can i reuse rmo_size, or introduce one new member in struct lmb. >> >> default_limit? > > alloc_limit or default_alloc_limit > looks that is not accurate. if someone want to find some area, but not going to access that range, then we should let them alloc it. how about access_limit? Thanks Yinghai Lu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: [PATCH 8/8] staging: vt6656: tcrc.c: Fixed coding style issues Next: [PATCH 0/2] perf: Use LBR for machine/oops debugging |