LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: Huang Ying <ying.huang@intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Avi Kivity <avi@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"Luck, Tony" <tony.luck@intel.com>,
	Dean Nelson <dnelson@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH 1/2] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally
Date: Thu, 27 Jan 2011 17:12:44 -0800	[thread overview]
Message-ID: <20110127171244.7a9442a7.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110128005711.GB15569@one.firstfloor.org>

On Fri, 28 Jan 2011 01:57:11 +0100
Andi Kleen <andi@firstfloor.org> wrote:

> I personally would consider it cleaner to have clearly
> defined wrappers instead of complicted flags in the caller.
> 
> > The number of args to these functions is getting nutty - you'll
> > probably find that it is beneficial to inline these wrapepr functions, if
> > the number of callsites is small.
> 
> Really the functions are so heavy weight it should not matter.
> The problem with inlining is that you end up with the code in
> the header file and I personally find that much harder to browse
> instead of having everything in one file.

You'll cope.

> Also longer term we'll get compilers that can do cross-file inlining
> for optimized builds.

Which we'll probably need to turn off all over the place :(

> So please better avoid these kinds of micro optimizations unless
> it's a really really extremly speed critical path.

It's not just speed and it's not just .text size, either. Calling a
ten-arg function consumes stack space.

  reply	other threads:[~2011-01-28  1:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13  8:42 Huang Ying
2011-01-13 10:43 ` Avi Kivity
2011-01-14  1:37   ` Huang Ying
2011-01-16 15:35     ` Avi Kivity
2011-01-17  0:47       ` Huang Ying
2011-01-20 15:50         ` Marcelo Tosatti
2011-01-27  7:29           ` Huang Ying
2011-01-27 23:07             ` Andrew Morton
2011-01-28  0:57               ` Andi Kleen
2011-01-28  1:12                 ` Andrew Morton [this message]
2011-01-28  7:39                   ` Andi Kleen

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=20110127171244.7a9442a7.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=avi@redhat.com \
    --cc=dnelson@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=ying.huang@intel.com \
    --subject='Re: [PATCH 1/2] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally' \
    /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

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