linux-um archives
 help / color / mirror / Atom feed
* [PATCH] delete unnecessary bootmem struct page array
@ 2014-06-01 13:08 Real Name
  2014-06-01 13:08 ` Real Name
  0 siblings, 1 reply; 5+ messages in thread
From: Real Name @ 2014-06-01 13:08 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: richard, linux-kernel, Honggang Li

From: Honggang Li <enjoymindful@gmail.com>

The patch based on linux-next-20140530.

Honggang Li (1):
  delete unnecessary bootmem struct page array

 arch/um/kernel/um_arch.c | 6 ------
 1 file changed, 6 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] delete unnecessary bootmem struct page array
@ 2014-05-31 23:34 Real Name
  2014-06-01  0:12 ` Real Name
  0 siblings, 1 reply; 5+ messages in thread
From: Real Name @ 2014-05-31 23:34 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: richard, linux-kernel, Real Name

1) uml kernel bootmem managed through bootmem_data->node_bootmem_map,
not struct page array, so it is unnecessary.

2) the struct page array allocate has been pointer by a *loacl* pointer
struct page *map in init_maps function. The array can't be access after
the init_maps exit. As a result, there is about 1% of total memory leak.
---
 arch/um/kernel/um_arch.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 016adf0..9f3c6d1 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -309,11 +309,6 @@ int __init linux_main(int argc, char **argv)
 	 */
 
 	diff = UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end);
-	if (diff > 1024 * 1024) {
-		printf("Adding %ld bytes to physical memory to account for "
-		       "exec-shield gap\n", diff);
-		physmem_size += UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end);
-	}
 
 	uml_physmem = (unsigned long) &__binary_start & PAGE_MASK;
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-01 13:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-01 13:08 [PATCH] delete unnecessary bootmem struct page array Real Name
2014-06-01 13:08 ` Real Name
2014-06-01 13:57   ` Richard Weinberger
  -- strict thread matches above, loose matches on Subject: below --
2014-05-31 23:34 Real Name
2014-06-01  0:12 ` Real Name

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox