All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@amd.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: oprofile-list <oprofile-list@lists.sourceforge.net>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 08/10] oprofile: set values to default when creating oprofilefs
Date: Tue, 16 Dec 2008 12:56:09 +0100	[thread overview]
Message-ID: <20081216115609.GA15411@erda.amd.com> (raw)
In-Reply-To: <20081216013225.272a5fd1.akpm@linux-foundation.org>

On 16.12.08 01:32:25, Andrew Morton wrote:
> > +unsigned long fs_buffer_size;
> > +unsigned long fs_cpu_buffer_size;
> > +unsigned long fs_buffer_watershed;
> 
> These were poorly chosen kernel-wide identifiers.

Right, didn't notice that. Will change this.

> >  static ssize_t depth_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
> >  {
> > @@ -120,6 +124,11 @@ static const struct file_operations dump_fops = {
> >  
> >  void oprofile_create_files(struct super_block *sb, struct dentry *root)
> >  {
> > +	/* reinitialize default values */
> > +	fs_buffer_size =	FS_BUFFER_SIZE_DEFAULT;
> > +	fs_cpu_buffer_size =	FS_CPU_BUFFER_SIZE_DEFAULT;
> > +	fs_buffer_watershed =	FS_BUFFER_WATERSHED_DEFAULT;
> > +
> >  	oprofilefs_create_file(sb, root, "enable", &enable_fops);
> >  	oprofilefs_create_file_perm(sb, root, "dump", &dump_fops, 0666);
> >  	oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops);
> 
> afacit oprofile_create_files() only gets run when the module is loaded,
> so this patch is a no-op?

This code runs when oprofilefs is mounted. This happens typically in
an opcontrol --init/--deinit sequence. Before, the previous values
would have been used after mounting again. Now, default values are
restored.

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com


  reply	other threads:[~2008-12-16 11:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-11 15:04 [PATCH 0/10] oprofile and ftrace: some trivial patches Robert Richter
2008-12-11 15:04 ` [PATCH 01/10] oprofile: comment cleanup Robert Richter
2008-12-11 15:04 ` [PATCH 02/10] oprofile: update comment for oprofile_add_sample() Robert Richter
2008-12-11 15:04 ` [PATCH 03/10] oprofile: whitspace changes only Robert Richter
2008-12-11 15:04 ` [PATCH 04/10] oprofile: fix typo Robert Richter
2008-12-11 15:04 ` [PATCH 05/10] x86/oprofile: reordering IBS code in op_model_amd.c Robert Richter
2008-12-11 15:04 ` [PATCH 06/10] x86/oprofile: cleanup IBS init/exit functions " Robert Richter
2008-12-11 15:04 ` [PATCH 07/10] oprofile: implement switch/case in buffer_sync.c Robert Richter
2008-12-11 15:04 ` [PATCH 08/10] oprofile: set values to default when creating oprofilefs Robert Richter
2008-12-16  9:32   ` Andrew Morton
2008-12-16 11:56     ` Robert Richter [this message]
2008-12-11 15:04 ` [PATCH 09/10] ring_buffer: update description for ring_buffer_alloc() Robert Richter
2008-12-11 15:04 ` [PATCH 10/10] ftrace: remove unused function arg in trace_iterator_increment() Robert Richter

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=20081216115609.GA15411@erda.amd.com \
    --to=robert.richter@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oprofile-list@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.