public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: eranian@hpl.hp.com
Cc: perfmon@napali.hpl.hp.com, linux-ia64@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.18 perfmon new code base + libpfm + pfmon
Date: Thu, 28 Sep 2006 07:05:16 +0000	[thread overview]
Message-ID: <20060928000516.1a0aaca0.akpm@osdl.org> (raw)
In-Reply-To: <20060928064949.GA18245@frankl.hpl.hp.com>

On Wed, 27 Sep 2006 23:49:49 -0700
Stephane Eranian <eranian@hpl.hp.com> wrote:

> Andrew,
> 
> On Wed, Sep 27, 2006 at 04:31:00PM -0700, Andrew Morton wrote:
> > > 
> > > Here is the summary of the various point raised by your review and the current
> > > status. I am hoping to close all points by next release.
> > > 
> > > ...
> > > 
> > > [akpm]: use fget_light() in some place instead of fget()
> > > 	- not sure understand when to use one versus the other
> > >
> > 
> > They are always interchangeable.  fget_light() is simply an optimised,
> > messier-to-use version.
> 
> What are exactly the assumptions of fget_light()?

Just the ones in the comment, really - it assumes that the caller has a
single ref on the file.  ie: we're within a system call which passed in an
fd, or within a pagefault and this file* is current->mm->some_vma->vm_file.

You _might_ get into trouble if using it against some file* which belongs
to a different process, and if you don't already have a ref on that file*. 
But that's usually a bug anyway, unless the code is aware of and is
exploiting the RCU management of these things.

There are lots of example usages around the place.

> > 
> > >
> > > ..
> > >
> > > [akpm]: carta_random32() should be in another header file
> > > 	- yes, I know. Should I create a specific header file? I don't think random.h
> > > 	  is meant for this.
> > 
> > I suppose so.  Or just stick the declaration into kernel.h.
> > 
> > I had a patch go past the other day which had a hand-rolled
> > fast-but-not-very-good pseudo random number generator in it.  I couldn't
> > remember where I'd seen one, and now I can't remember what patch it was
> > that needed it.  Sigh.
> > 
> > Anyway, a standalone patch which adds that function into lib/whatever.c
> > would be nice.
> 
> I will post a standalone patch for carta random. I can provide a standalone header
> file in include/linux/carta_random.h. 

Thanks.

  reply	other threads:[~2006-09-28  7:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-26 14:34 2.6.18 perfmon new code base + libpfm + pfmon Stephane Eranian
2006-09-27  5:09 ` Andrew Morton
2006-09-27 22:48   ` Stephane Eranian
2006-09-27 23:31     ` Andrew Morton
2006-09-28  6:49       ` Stephane Eranian
2006-09-28  7:05         ` Andrew Morton [this message]
2006-09-28  7:32     ` Andi Kleen
2006-09-28  7:56       ` Stephane Eranian
2006-09-28  8:05         ` Andi Kleen
2006-09-29  9:30           ` Stephane Eranian
2006-09-28 13:41     ` Christoph Hellwig
2006-09-28 14:04       ` Stephane Eranian

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=20060928000516.1a0aaca0.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=eranian@hpl.hp.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perfmon@napali.hpl.hp.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