All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: Nathan Lynch <ntl@pobox.com>, Oren Laadan <orenl@cs.columbia.edu>,
	Daniel Lezcano <dlezcano@fr.ibm.com>,
	Serge Hallyn <serue@us.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Glauber Costa <glommer@parallels.com>,
	containers@lists.osdl.org, linux-kernel@vger.kernel.org,
	Pavel Emelyanov <xemul@parallels.com>,
	Serge Hallyn <serge.hallyn@canonical.com>
Subject: Re: [patch 1/4] proc: Introduce the /proc/<pid>/mfd/ directory
Date: Mon, 8 Aug 2011 20:20:33 +0400	[thread overview]
Message-ID: <20110808162032.GC2434@sun> (raw)
In-Reply-To: <20110808154842.GD22863@htj.dyndns.org>

On Mon, Aug 08, 2011 at 05:48:42PM +0200, Tejun Heo wrote:
> Hello,
> 
> Maybe cc'ing linux-mm is a good idea for this one?

Yup!
...

> > 
> > This thing is aimed to help checkpointing processes.
> 
> I generally agree this is a good idea.  Can you please add how it
> would look (say, example ls -l output) in the patch description?
> Maybe some people think using both start and end addresses for symlink
> name is better?

OK, will do in update.

> 
> Another nit: I find the 'mfd' name a bit confusing as there's no file
> descriptor involved at all.  Maybe map_files (as we already have maps)
> or something like that?

map_files looks good to me.

> 
> > +static int proc_mfd_get_link(struct inode *inode, struct path *path)
> ...
> > +	down_read(&mm->mmap_sem);
> > +	for (vma = mm->mmap; vma; vma = vma->vm_next) {
> > +		if (vma->vm_start < vm_start)
> > +			continue;
> > +		if (vma->vm_start > vm_start)
> > +			break;
> 
> Why do linear walk instead of find_vma()?

I suppose we simply missed this helper :/

> 
> > +static const struct dentry_operations tid_mfd_dentry_operations = {
> > +	.d_delete	= pid_delete_dentry,
> > +};
> 
> Don't we also need revalidation here like tid_fd_dentry_operations?

Stricktly speaking, yes. Since in previous patchset this entries was
used in helper tool _only_ when task is frozen it was not needed but
to fit run-time requirements I think we need d_revalidate here indeed.
Thanks!

> Also, I think it would be better if all the related functions are
> collected into one contiguous chunk.  The scattering doesn't seem to
> make much sense.

ok

> 
> > +static struct dentry *proc_mfd_lookup(struct inode *dir,
> > +		struct dentry *dentry, struct nameidata *nd)
> > +{
> ..
> > +	down_read(&mm->mmap_sem);
> > +	for (vma = mm->mmap; vma; vma = vma->vm_next) {
> > +		if (vma->vm_start == vm_start)
> > +			break;
> > +		if (vma->vm_start > vm_start)
> > +			goto out_no_vma;
> > +	}
> 
> Ditto, no reason to do linear walk.

ok

> 
> Thanks.
> 

Thanks for comments, Tejun!

	Cyrill

  reply	other threads:[~2011-08-08 16:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-07 21:01 [patch 0/4] C/R related patch series Cyrill Gorcunov
2011-08-07 21:01 ` Cyrill Gorcunov
2011-08-07 21:01 ` [patch 1/4] proc: Introduce the /proc/<pid>/mfd/ directory Cyrill Gorcunov
2011-08-07 21:01   ` Cyrill Gorcunov
2011-08-07 21:11   ` Cyrill Gorcunov
2011-08-08 15:48   ` Tejun Heo
2011-08-08 16:20     ` Cyrill Gorcunov [this message]
2011-08-07 21:01 ` [patch 2/4] vfs: Introduce the fd closing helper Cyrill Gorcunov
2011-08-07 21:01   ` Cyrill Gorcunov
2011-08-08  9:54   ` Cyrill Gorcunov
2011-08-08  9:54     ` Cyrill Gorcunov
2011-08-08 14:39     ` Tejun Heo

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=20110808162032.GC2434@sun \
    --to=gorcunov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.osdl.org \
    --cc=dlezcano@fr.ibm.com \
    --cc=glommer@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntl@pobox.com \
    --cc=orenl@cs.columbia.edu \
    --cc=serge.hallyn@canonical.com \
    --cc=serue@us.ibm.com \
    --cc=tj@kernel.org \
    --cc=xemul@parallels.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 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.