From: Chris J Arges <chris.j.arges@canonical.com>
To: linux-kernel@vger.kernel.org
Cc: Chris J Arges <chris.j.arges@canonical.com>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org
Subject: [PATCH 2/3] mm: slub: parse slub_debug O option in switch statement
Date: Fri, 13 Feb 2015 16:19:36 -0600 [thread overview]
Message-ID: <1423865980-10417-2-git-send-email-chris.j.arges@canonical.com> (raw)
In-Reply-To: <1423865980-10417-1-git-send-email-chris.j.arges@canonical.com>
By moving the O option detection into the switch statement, we allow this
parameter to be combined with other options correctly. Previously options like
slub_debug=OFZ would only detect the 'o' and use DEBUG_DEFAULT_FLAGS to fill
in the rest of the flags.
Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
---
mm/slub.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 06cdb18..88482f8 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1112,15 +1112,6 @@ static int __init setup_slub_debug(char *str)
*/
goto check_slabs;
- if (tolower(*str) == 'o') {
- /*
- * Avoid enabling debugging on caches if its minimum order
- * would increase as a result.
- */
- disable_higher_order_debug = 1;
- goto out;
- }
-
slub_debug = 0;
if (*str == '-')
/*
@@ -1151,6 +1142,13 @@ static int __init setup_slub_debug(char *str)
case 'a':
slub_debug |= SLAB_FAILSLAB;
break;
+ case 'o':
+ /*
+ * Avoid enabling debugging on caches if its minimum
+ * order would increase as a result.
+ */
+ disable_higher_order_debug = 1;
+ break;
default:
pr_err("slub_debug option '%c' unknown. skipped\n",
*str);
--
1.9.1
next prev parent reply other threads:[~2015-02-13 22:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 22:19 [PATCH 1/3] Documentation: minor spelling and grammar fixes Chris J Arges
2015-02-13 22:19 ` Chris J Arges [this message]
2015-02-13 23:36 ` [PATCH 2/3] mm: slub: parse slub_debug O option in switch statement David Rientjes
2015-02-13 22:19 ` [PATCH 3/3] mm: slub: Add SLAB_DEBUG_CRASH option Chris J Arges
2015-02-13 23:38 ` David Rientjes
2015-02-13 23:52 ` Chris J Arges
2015-02-14 0:16 ` Christoph Lameter
2015-02-14 22:32 ` [PATCH v2] " Chris J Arges
2015-02-13 23:58 ` [PATCH 3/3] " Christoph Lameter
2015-02-13 23:12 ` [PATCH 1/3] Documentation: minor spelling and grammar fixes David Rientjes
2015-02-14 0:26 ` Randy Dunlap
2015-02-16 18:58 ` Jonathan Corbet
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=1423865980-10417-2-git-send-email-chris.j.arges@canonical.com \
--to=chris.j.arges@canonical.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.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
all inboxes | Powered by JetHome®