From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Rashmica Gupta <rashmica.g@gmail.com>,
bsingharora@gmail.com, mikey@neuling.org,
linuxppc-dev@lists.ozlabs.org, anton@samba.org
Cc: Rashmica Gupta <rashmica.g@gmail.com>
Subject: Re: powerpc/memtrace: Remove memory in chunks
Date: Thu, 20 Sep 2018 14:20:57 +1000 (AEST) [thread overview]
Message-ID: <42G3ST5YYkz9sCS@ozlabs.org> (raw)
In-Reply-To: <20180817042501.15538-1-rashmica.g@gmail.com>
On Fri, 2018-08-17 at 04:25:01 UTC, Rashmica Gupta wrote:
> When hot-removing memory release_mem_region_adjustable() splits iomem
> resources if they are not the exact size of the memory being
> hot-deleted. Adding this memory back to the kernel adds a new resource.
>
> Eg a node has memory 0x0 - 0xfffffffff. Hot-removing 1GB from
> 0xf40000000 results in the single resource 0x0-0xfffffffff being split
> into two resources: 0x0-0xf3fffffff and 0xf80000000-0xfffffffff.
>
> When we hot-add the memory back we now have three resources:
> 0x0-0xf3fffffff, 0xf40000000-0xf7fffffff, and 0xf80000000-0xfffffffff.
>
> This is an issue if we try to remove some memory that overlaps
> resources. Eg when trying to remove 2GB at address 0xf40000000,
> release_mem_region_adjustable() fails as it expects the chunk of memory
> to be within the boundaries of a single resource. We then get the
> warning: "Unable to release resource" and attempting to use memtrace
> again gives us this error: "bash: echo: write error: Resource
> temporarily unavailable"
>
> This patch makes memtrace remove memory in chunks that are always the
> same size from an address that is always equal to end_of_memory -
> n*size, for some n. So hotremoving and hotadding memory of different
> sizes will now not attempt to remove memory that spans multiple
> resources.
>
> Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/3f7daf3d7582dc6628ac40a9045dd1
cheers
prev parent reply other threads:[~2018-09-20 4:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-17 4:25 [PATCH] powerpc/memtrace: Remove memory in chunks Rashmica Gupta
2018-09-20 4:20 ` Michael Ellerman [this message]
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=42G3ST5YYkz9sCS@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=anton@samba.org \
--cc=bsingharora@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=rashmica.g@gmail.com \
/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.