From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Hugh Dickins <hughd@google.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: mm: ptl is not bloated if it fits in pointer
Date: Mon, 16 Dec 2013 15:50:05 +0200 (EET) [thread overview]
Message-ID: <20131216135005.AC5FDE0090@blue.fi.intel.com> (raw)
In-Reply-To: <20131216100446.GT21999@twins.programming.kicks-ass.net>
Peter Zijlstra wrote:
> On Mon, Dec 16, 2013 at 01:04:13AM -0800, Hugh Dickins wrote:
> > It's silly to force the 64-bit CONFIG_GENERIC_LOCKBREAK architectures
> > to kmalloc eight bytes for an indirect page table lock: the lock needs
> > to fit in the space that a pointer to it would occupy, not into an int.
>
> Ah, no. A spinlock is very much assumed to be 32bit, any spinlock that's
> bigger than that is bloated.
>
> For the page-frame case we do indeed not care about the strict 32bit but
> more about not being larger than a pointer, however there are already
> other users.
>
> See for instance include/linux/lockref.h and lib/lockref.c, they very
> much require the spinlock to be 32bit and the below would break that.
What about this instead? Smoke-tested.
next prev parent reply other threads:[~2013-12-16 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 9:04 Hugh Dickins
2013-12-16 10:04 ` Peter Zijlstra
2013-12-16 13:50 ` Kirill A. Shutemov [this message]
2013-12-17 0:29 ` Hugh Dickins
2013-12-16 10:12 ` Peter Zijlstra
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=20131216135005.AC5FDE0090@blue.fi.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox