All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Real Name <enjoymindful@gmail.com>,
	user-mode-linux-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [uml-devel] [PATCH] delete unnecessary bootmem struct page array
Date: Sun, 01 Jun 2014 09:54:20 +0200	[thread overview]
Message-ID: <538ADC2C.6060902@nod.at> (raw)
In-Reply-To: <1401582246-30025-1-git-send-email-enjoymindful@gmail.com>

Hi!

Am 01.06.2014 02:24, schrieb 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.

Please add a Signed-off-by tag using your real name.

Thanks,
//richard

> ---
>  arch/um/kernel/um_arch.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
> index 016adf0..d4c98d1 100644
> --- a/arch/um/kernel/um_arch.c
> +++ b/arch/um/kernel/um_arch.c
> @@ -348,12 +348,6 @@ int __init linux_main(int argc, char **argv)
>  	start_vm = VMALLOC_START;
>  
>  	setup_physmem(uml_physmem, uml_reserved, physmem_size, highmem);
> -	if (init_maps(physmem_size, iomem_size, highmem)) {
> -		printf("Failed to allocate mem_map for %Lu bytes of physical "
> -		       "memory and %Lu bytes of highmem\n", physmem_size,
> -		       highmem);
> -		exit(1);
> -	}
>  
>  	virtmem_size = physmem_size;
>  	stack = (unsigned long) argv;
> 

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: Real Name <enjoymindful@gmail.com>,
	user-mode-linux-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] delete unnecessary bootmem struct page array
Date: Sun, 01 Jun 2014 09:54:20 +0200	[thread overview]
Message-ID: <538ADC2C.6060902@nod.at> (raw)
In-Reply-To: <1401582246-30025-1-git-send-email-enjoymindful@gmail.com>

Hi!

Am 01.06.2014 02:24, schrieb 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.

Please add a Signed-off-by tag using your real name.

Thanks,
//richard

> ---
>  arch/um/kernel/um_arch.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
> index 016adf0..d4c98d1 100644
> --- a/arch/um/kernel/um_arch.c
> +++ b/arch/um/kernel/um_arch.c
> @@ -348,12 +348,6 @@ int __init linux_main(int argc, char **argv)
>  	start_vm = VMALLOC_START;
>  
>  	setup_physmem(uml_physmem, uml_reserved, physmem_size, highmem);
> -	if (init_maps(physmem_size, iomem_size, highmem)) {
> -		printf("Failed to allocate mem_map for %Lu bytes of physical "
> -		       "memory and %Lu bytes of highmem\n", physmem_size,
> -		       highmem);
> -		exit(1);
> -	}
>  
>  	virtmem_size = physmem_size;
>  	stack = (unsigned long) argv;
> 

  reply	other threads:[~2014-06-01  7:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01  0:24 [uml-devel] [PATCH] delete unnecessary bootmem struct page array Real Name
2014-06-01  0:24 ` Real Name
2014-06-01  7:54 ` Richard Weinberger [this message]
2014-06-01  7:54   ` Richard Weinberger
  -- strict thread matches above, loose matches on Subject: below --
2014-06-03  5:30 [uml-devel] [PATCH v2] " Real Name
2014-06-03  5:30 ` [uml-devel] [PATCH] " Real Name

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=538ADC2C.6060902@nod.at \
    --to=richard@nod.at \
    --cc=enjoymindful@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.