From: Dave Hansen <dave.hansen@intel.com>
To: Sasha Levin <sasha.levin@oracle.com>, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
hughd@google.com, mgorman@suse.de,
Christoph Lameter <cl@linux.com>
Subject: Re: [PATCH 5/5] mm: poison page struct
Date: Tue, 07 Oct 2014 15:02:52 -0700 [thread overview]
Message-ID: <5434630C.3070006@intel.com> (raw)
In-Reply-To: <1412041639-23617-6-git-send-email-sasha.levin@oracle.com>
On 09/29/2014 06:47 PM, Sasha Levin wrote:
> struct page {
> +#ifdef CONFIG_DEBUG_VM_POISON
> + u32 poison_start;
> +#endif
> /* First double word block */
> unsigned long flags; /* Atomic flags, some possibly
> * updated asynchronously */
> @@ -196,6 +199,9 @@ struct page {
> #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS
> int _last_cpupid;
> #endif
> +#ifdef CONFIG_DEBUG_VM_POISON
> + u32 poison_end;
> +#endif
> }
Does this break slub's __cmpxchg_double_slab trick? I thought it
required page->freelist and page->counters to be doubleword-aligned.
It's not like we really require this optimization when we're debugging,
but trying to use it will unnecessarily slow things down.
FWIW, if you're looking to trim down the number of lines of code, you
could certainly play some macro tricks and #ifdef tricks.
struct vm_poison {
#ifdef CONFIG_DEBUG_VM_POISON
u32 val;
#endif
};
Then, instead of #ifdefs in each structure, you do:
struct page {
struct vm_poison poison_start;
... other gunk
struct vm_poison poison_end;
};
--
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:[~2014-10-07 22:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 1:47 [PATCH 0/5] mm: poison critical mm/ structs Sasha Levin
2014-09-30 1:47 ` [PATCH 1/5] mm: add poisoning basics Sasha Levin
2014-09-30 1:47 ` [PATCH 2/5] mm: constify dump_page and friends Sasha Levin
2014-09-30 1:47 ` [PATCH 3/5] mm: poison mm_struct Sasha Levin
2014-09-30 1:47 ` [PATCH 4/5] mm: poison vm_area_struct Sasha Levin
2014-09-30 1:47 ` [PATCH 5/5] mm: poison page struct Sasha Levin
2014-10-07 22:02 ` Dave Hansen [this message]
2014-10-08 7:10 ` Christoph Lameter
2014-10-08 14:22 ` Sasha Levin
2014-10-01 21:07 ` [PATCH 0/5] mm: poison critical mm/ structs Andrew Morton
2014-10-01 21:39 ` Sasha Levin
2014-10-01 21:48 ` Andrew Morton
2014-10-02 3:51 ` Sasha Levin
2014-10-02 9:23 ` Hugh Dickins
2014-10-02 14:58 ` Sasha Levin
2014-10-07 22:16 ` Dave Hansen
2014-10-08 16:43 ` Sasha Levin
2014-10-02 15:13 ` Dave Jones
2014-10-09 19:11 ` Sasha Levin
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=5434630C.3070006@intel.com \
--to=dave.hansen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=sasha.levin@oracle.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).