linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Andy Lutomirski <luto@amacapital.net>,
	Pavel Emelyanov <xemul@parallels.com>,
	Matt Mackall <mpm@selenic.com>,
	Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Peter Zijlstra <peterz@infradead.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH -mm] mm: Unify pte_to_pgoff and pgoff_to_pte helpers
Date: Wed, 14 Aug 2013 12:20:00 +0400	[thread overview]
Message-ID: <20130814082000.GN2869@moon> (raw)
In-Reply-To: <20130814010856.0098398b.akpm@linux-foundation.org>

On Wed, Aug 14, 2013 at 01:08:56AM -0700, Andrew Morton wrote:
> > 
> > > Can it be written in C with types and proper variable names and such
> > > radical stuff?
> > 
> > Could you elaborate? You mean inline helper or macro with type checks?
> 
> /*
>  * description goes here
>  */
> static inline pteval_t pte_bfop(pteval_t val, int rightshift, ...)
> {
> 	...
> }
> 
> So much better!  We really should only implement code in a macro if it
> *has* to be done as a macro and I don't think that's the case here?

Well, I'll have to check if it really doesn't generate additional
instructions in generated code, since it's hotpath. I'll ping back
once things are done.

--
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:[~2013-08-14  8:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14  7:00 [PATCH -mm] mm: Unify pte_to_pgoff and pgoff_to_pte helpers Cyrill Gorcunov
2013-08-14  7:22 ` H. Peter Anvin
2013-08-14  7:24   ` Cyrill Gorcunov
2013-08-14  7:31     ` H. Peter Anvin
2013-08-14  7:33       ` Andrew Morton
2013-08-14  7:43         ` Cyrill Gorcunov
2013-08-14  8:08           ` Andrew Morton
2013-08-14  8:20             ` Cyrill Gorcunov [this message]
2013-08-14  9:50               ` Ingo Molnar
2013-08-14 10:02                 ` Cyrill Gorcunov

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=20130814082000.GN2869@moon \
    --to=gorcunov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=hpa@zytor.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=mingo@elte.hu \
    --cc=mpm@selenic.com \
    --cc=mtosatti@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=xemul@parallels.com \
    --cc=xiaoguangrong@linux.vnet.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).