linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Chris Wright <chrisw@sous-sol.org>,
	Al Viro <viro@ftp.linux.org.uk>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	"Hallyn, Serge" <serue@us.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] Simplify /proc/<pid|self>/exe symlink code
Date: Fri, 13 Jul 2007 12:54:20 -0700	[thread overview]
Message-ID: <1184356460.16131.4.camel@localhost.localdomain> (raw)
In-Reply-To: <20070712192114.bb357ce4.akpm@linux-foundation.org>

On Thu, 2007-07-12 at 19:21 -0700, Andrew Morton wrote:
> On Thu, 12 Jul 2007 19:00:12 -0700 Matt Helsley <matthltc@us.ibm.com> wrote:
> 
> > This patch avoids holding the mmap semaphore while walking VMAs in response to
> > programs which read or follow the /proc/<pid|self>/exe symlink. This also allows
> > us to merge mmu and nommu proc_exe_link() functions. The costs are holding the
> > task lock, a separate reference to the executable file stored in the task
> > struct, and increased code in fork, exec, and exit paths.
> > 
> > Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
> > ---
> > 
> > Changelog:
> > 
> > Hold task_lock() while using task->exe_file. With this change I haven't
> > 	been able to reproduce Chris Wright's Oops report:
> > 		http://lkml.org/lkml/2007/5/31/34 
> > 	I used a 4-way, x86 system running kernbench. I also tried a 4-way x86_64
> > 	system running pidof. I used oprofile during all runs but I could not
> > 	reproduce Chris' Oops with the new patch.
> > 
> > Compiled and passed simple tests for regressions when patched against a 2.6.20
> > and a 2.6.22 kernel. Regression tests included a variety of file operations on
> > /proc/<pid|self>/exe such as stat, lstat, open, close, readlink, and unlink. All
> > produced the expected, baseline output results.
> > 
> > Andrew, please consider this patch for inclusion in -mm.
> 
> I wish we had a description of the bug which this fixes.  That email of
> Chris's is referencing code which diddles with task_struct.exe_file, but
> your patch _adds_ task_struct.exe_file, so I am all confused.

Chris was testing the patch. The patch isn't a bug fix so much as a
failed attempt to remove one use of the mm's mmap lock.

> Your patch does lots of fput()s under task_lock(), but fput() can sleep.

Ack, you're right.

> Plus what Al said.

Yup.

Thanks,
	-Matt Helsley

--
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:[~2007-07-13 19:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-13  2:00 Matt Helsley
2007-07-13  2:07 ` Al Viro
2007-07-16 19:31   ` Matt Helsley
2007-07-13  2:21 ` Andrew Morton
2007-07-13 19:54   ` Matt Helsley [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=1184356460.16131.4.camel@localhost.localdomain \
    --to=matthltc@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=chrisw@sous-sol.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterz@infradead.org \
    --cc=serue@us.ibm.com \
    --cc=viro@ftp.linux.org.uk \
    /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