From: Christian Borntraeger <borntraeger@de.ibm.com>
To: js1304@gmail.com, Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Takashi Iwai <tiwai@suse.com>,
Chris Metcalf <cmetcalf@ezchip.com>,
Christoph Lameter <cl@linux.com>,
linux-api@vger.kernel.org, Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH v2 2/5] mm/slub: query dynamic DEBUG_PAGEALLOC setting
Date: Thu, 11 Feb 2016 13:17:42 +0100 [thread overview]
Message-ID: <56BC7BE6.7000802@de.ibm.com> (raw)
In-Reply-To: <1455163501-9341-3-git-send-email-iamjoonsoo.kim@lge.com>
On 02/11/2016 05:04 AM, js1304@gmail.com wrote:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> We can disable debug_pagealloc processing even if the code is compiled
> with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query
> whether it is enabled or not in runtime.
>
> v2: clean up code, per Christian.
>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> mm/slub.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index 606488b..a1874c2 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -250,11 +250,10 @@ static inline void *get_freepointer_safe(struct kmem_cache *s, void *object)
> {
> void *p;
>
> -#ifdef CONFIG_DEBUG_PAGEALLOC
> + if (!debug_pagealloc_enabled())
> + return get_freepointer(s, object);
> +
> probe_kernel_read(&p, (void **)(object + s->offset), sizeof(p));
> -#else
> - p = get_freepointer(s, object);
> -#endif
> return p;
> }
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-02-11 12:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 4:04 [PATCH v2 0/5] follow-up "Optimize CONFIG_DEBUG_PAGEALLOC" js1304
2016-02-11 4:04 ` [PATCH v2 1/5] mm/vmalloc: query dynamic DEBUG_PAGEALLOC setting js1304
2016-02-11 4:04 ` [PATCH v2 2/5] mm/slub: " js1304
2016-02-11 12:17 ` Christian Borntraeger [this message]
2016-02-11 4:04 ` [PATCH v2 3/5] sound: " js1304
2016-02-11 4:05 ` [PATCH v2 4/5] powerpc: " js1304
2016-02-11 4:05 ` [PATCH v2 5/5] tile: " js1304
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=56BC7BE6.7000802@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=cl@linux.com \
--cc=cmetcalf@ezchip.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=js1304@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).