Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2015-01-06 Thread Joonsoo Kim
On Mon, Jan 05, 2015 at 08:01:45PM -0800, Gregory Fong wrote: > +linux-mm and linux-kernel (not sure how those got removed from cc, > sorry about that) > > On Mon, Jan 5, 2015 at 7:58 PM, Gregory Fong wrote: > > Hi Joonsoo, > > > > On Wed, May 28, 2014 at 12:04 AM, Joonsoo Kim > > wrote: > >> d

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2015-01-05 Thread Gregory Fong
+linux-mm and linux-kernel (not sure how those got removed from cc, sorry about that) On Mon, Jan 5, 2015 at 7:58 PM, Gregory Fong wrote: > Hi Joonsoo, > > On Wed, May 28, 2014 at 12:04 AM, Joonsoo Kim wrote: >> diff --git a/mm/page_alloc.c b/mm/page_alloc.c >> index 674ade7..ca678b6 100644 >> -

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-10-30 Thread Hui Zhu
On Wed, May 28, 2014 at 3:04 PM, Joonsoo Kim wrote: > CMA is introduced to provide physically contiguous pages at runtime. > For this purpose, it reserves memory at boot time. Although it reserve > memory, this reserved memory can be used for movable memory allocation > request. This usecase is be

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-06-02 Thread Gioh Kim
I'm not sure what I'm doing wrong. These are my code. 770 #ifdef CONFIG_CMA 771 void adjust_managed_cma_page_count(struct zone *zone, long count) 772 { 773 unsigned long flags; 774 long total, cma, movable; 775 776 spin_lock_irqsave(&zone->lock, flags); 777 778

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-06-01 Thread Joonsoo Kim
On Mon, Jun 02, 2014 at 02:54:30PM +0900, Gioh Kim wrote: > I found 2 problems at my platform. > > 1st is occured when I set CMA size 528MB and total memory is 960MB. > I print some values in adjust_managed_cma_page_count(), > the total value becomes 105439 and cma value 131072. > Finally movable

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-06-01 Thread Joonsoo Kim
On Sat, May 31, 2014 at 09:02:51AM +0900, Michal Nazarewicz wrote: > > On Thu, May 29, 2014 at 05:09:34PM +0900, Gioh Kim wrote: > >> Is IS_ENABLED(CONFIG_CMA) necessary? > >> What about if (migratetype == MIGRATE_MOVABLE && zone->managed_cma_pages) ? > > On Fri, May 30 2014, Joonsoo Kim wrote: >

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-06-01 Thread Gioh Kim
I found 2 problems at my platform. 1st is occured when I set CMA size 528MB and total memory is 960MB. I print some values in adjust_managed_cma_page_count(), the total value becomes 105439 and cma value 131072. Finally movable value becomes negative value. The total value 105439 means 411MB. Is

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-30 Thread Michal Nazarewicz
On Wed, May 28 2014, Joonsoo Kim wrote: > @@ -1143,10 +1223,15 @@ __rmqueue_fallback(struct zone *zone, int order, int > start_migratetype) > static struct page *__rmqueue(struct zone *zone, unsigned int order, > int migratetype) > { > - struct

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-30 Thread Michal Nazarewicz
> On Thu, May 29, 2014 at 05:09:34PM +0900, Gioh Kim wrote: >> Is IS_ENABLED(CONFIG_CMA) necessary? >> What about if (migratetype == MIGRATE_MOVABLE && zone->managed_cma_pages) ? On Fri, May 30 2014, Joonsoo Kim wrote: > Yes, field, managed_cma_pages exists only if CONFIG_CMA is enabled, so > rem

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-30 Thread Joonsoo Kim
2014-05-30 16:53 GMT+09:00 Gioh Kim : > Joonsoo, > > I'm attaching a patch for combination of __rmqueue and __rmqueue_cma. > I didn't test fully but my board is turned on and working well if no frequent > memory allocations. > > I'm sorry to send not-tested code. > I just want to report this durin

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-30 Thread Gioh Kim
Joonsoo, I'm attaching a patch for combination of __rmqueue and __rmqueue_cma. I didn't test fully but my board is turned on and working well if no frequent memory allocations. I'm sorry to send not-tested code. I just want to report this during your working hour ;-) I'm testing this this eveni

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-29 Thread Joonsoo Kim
On Thu, May 29, 2014 at 05:09:34PM +0900, Gioh Kim wrote: > > >>>+ > >>> /* > >>>* Do the hard work of removing an element from the buddy allocator. > >>>* Call me with the zone->lock already held. > >>>@@ -1143,10 +1223,15 @@ __rmqueue_fallback(struct zone *zone, int order, > >>>int st

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-29 Thread Gioh Kim
+ /* * Do the hard work of removing an element from the buddy allocator. * Call me with the zone->lock already held. @@ -1143,10 +1223,15 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype) static struct page *__rmqueue(struct zone *zone, unsigned int order,

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-29 Thread Joonsoo Kim
On Thu, May 29, 2014 at 04:24:58PM +0900, Gioh Kim wrote: > I've not understand your code fully. Please let me ask some silly questions. > > 2014-05-28 오후 4:04, Joonsoo Kim 쓴 글: > > CMA is introduced to provide physically contiguous pages at runtime. > > For this purpose, it reserves memory at boo

Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-29 Thread Gioh Kim
I've not understand your code fully. Please let me ask some silly questions. 2014-05-28 오후 4:04, Joonsoo Kim 쓴 글: > CMA is introduced to provide physically contiguous pages at runtime. > For this purpose, it reserves memory at boot time. Although it reserve > memory, this reserved memory can be us

[PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-28 Thread Joonsoo Kim
CMA is introduced to provide physically contiguous pages at runtime. For this purpose, it reserves memory at boot time. Although it reserve memory, this reserved memory can be used for movable memory allocation request. This usecase is beneficial to the system that needs this CMA reserved memory in