linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: akpm@linux-foundation.org, aarcange@redhat.com,
	linux-mm@kvack.org, ak@linux.intel.com, hughd@google.com,
	linux-kernel@vger.kernel.org, schwidefsky@de.ibm.com
Subject: Re: [RFC patch 7/7] thp, s390: architecture backend for thp on System z
Date: Fri, 24 Aug 2012 10:07:00 +0200	[thread overview]
Message-ID: <20120824080700.GC3533@osiris.de.ibm.com> (raw)
In-Reply-To: <20120823171855.006932817@de.ibm.com>

On Thu, Aug 23, 2012 at 07:17:40PM +0200, Gerald Schaefer wrote:
> +#define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
> +static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
> +					    unsigned long address,
> +					    pmd_t *pmdp)
> +{
> +	int rc = 0;
> +	int counter = PTRS_PER_PTE;
> +	unsigned long pmd_addr = pmd_val(*pmdp) & HPAGE_MASK;
> +
> +	asm volatile(
> +		"0:	rrbe	0,%2\n"
> +		"	la	%2,0(%3,%2)\n"
> +		"	brc	12,1f\n"
> +		"	lhi	%0,1\n"
> +		"1:	brct	%1,0b\n"
> +		: "+d" (rc), "+d" (counter), "+a" (pmd_addr)
> +		: "a" (4096UL): "cc" );
> +	return rc;
> +}

Just a small side note: given that rrbe is very expensive you probably
should extend this function so it makes use of the rrbm instruction
if available.

--
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>

      reply	other threads:[~2012-08-24  8:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 17:17 [RFC patch 0/7] thp: transparent hugepages on System z Gerald Schaefer
2012-08-23 17:17 ` [RFC patch 1/7] thp: remove assumptions on pgtable_t type Gerald Schaefer
2012-08-23 17:17 ` [RFC patch 2/7] thp: introduce pmdp_invalidate() Gerald Schaefer
2012-08-25 12:36   ` Hillf Danton
2012-08-27 10:27     ` Gerald Schaefer
2012-08-23 17:17 ` [RFC patch 3/7] thp: make MADV_HUGEPAGE check for mm->def_flags Gerald Schaefer
2012-08-25 12:47   ` Hillf Danton
2012-08-27 10:39     ` Gerald Schaefer
2012-08-27 12:26       ` Hillf Danton
2012-08-23 17:17 ` [RFC patch 4/7] thp, s390: thp splitting backend for System z Gerald Schaefer
2012-08-23 17:17 ` [RFC patch 5/7] thp, s390: thp pagetable pre-allocation " Gerald Schaefer
2012-08-23 17:17 ` [RFC patch 6/7] thp, s390: disable thp for kvm host on " Gerald Schaefer
2012-08-23 17:17 ` [RFC patch 7/7] thp, s390: architecture backend for thp " Gerald Schaefer
2012-08-24  8:07   ` Heiko Carstens [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=20120824080700.GC3533@osiris.de.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=aarcange@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=schwidefsky@de.ibm.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).