From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] eliminate lock profile pointer from spinlock structure when !LOCK_PROFILE
Date: Tue, 07 Aug 2012 13:14:44 +0100 [thread overview]
Message-ID: <CC46C544.3AEE7%keir.xen@gmail.com> (raw)
In-Reply-To: <50211AEF0200007800093332@nat28.tlf.novell.com>
On 07/08/2012 12:41, "Jan Beulich" <JBeulich@suse.com> wrote:
> This pointer is never used for anything, and needlessly increases the
> memory footprint of various pieces of data.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Good catch.
Acked-by: Keir Fraser <keir@xen.org>
> --- a/xen/include/xen/spinlock.h
> +++ b/xen/include/xen/spinlock.h
> @@ -115,11 +115,10 @@ extern void spinlock_profile_reset(unsig
>
> #else
>
> -struct lock_profile { };
> struct lock_profile_qhead { };
>
> #define SPIN_LOCK_UNLOCKED
> \
> - { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG, NULL }
> + { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG }
> #define DEFINE_SPINLOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED
>
> #define spin_lock_init_prof(s, l) spin_lock_init(&((s)->l))
> @@ -133,7 +132,9 @@ typedef struct spinlock {
> u16 recurse_cpu:12;
> u16 recurse_cnt:4;
> struct lock_debug debug;
> +#ifdef LOCK_PROFILE
> struct lock_profile *profile;
> +#endif
> } spinlock_t;
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
prev parent reply other threads:[~2012-08-07 12:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 11:41 [PATCH] eliminate lock profile pointer from spinlock structure when !LOCK_PROFILE Jan Beulich
2012-08-07 12:14 ` Keir Fraser [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=CC46C544.3AEE7%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xen.org \
/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.