All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Benjamin Peterson <benjamin@python.org>
Cc: peterz@infradead.org, mingo@redhat.com,
	alexander.shishkin@linux.intel.com, jolsa@redhat.com,
	namhyung@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf trace beautify: Beautify flags of mount(2) and umount(2).
Date: Wed, 10 Oct 2018 09:55:06 -0300	[thread overview]
Message-ID: <20181010125506.GH10775@kernel.org> (raw)
In-Reply-To: <1539143546.2716467.1536750504.65ADF11A@webmail.messagingengine.com>

Em Tue, Oct 09, 2018 at 08:52:26PM -0700, Benjamin Peterson escreveu:
> Hi Arnaldo,
> Did you get a chance to look at this again?

Thanks, for pinging me about it, will check.

- Arnaldo
 
> On Thu, Aug 30, 2018, at 14:50, Benjamin Peterson wrote:
> > Thanks for the review.
> > 
> > On Thu, Aug 30, 2018, at 11:28, Arnaldo Carvalho de Melo wrote:
> > > Em Mon, Aug 27, 2018 at 08:53:44PM -0700, Benjamin Peterson escreveu:
> > > > Example output of perf trace -e mount,umount2:
> > > > 
> > > >   6243.930 ( 0.052 ms): mount/30976 mount(dev_name: 0x55dc541bb920, dir_name: 0x55dc541bc960, type: 0x55dc541b9c40, flags: BIND) = 0
> > > >   7851.821 (26.015 ms): umount/30983 umount2(name: 0x558daa82cf50, flags: MNT_FORCE                        ) = 0
> > > > 
> > > > Signed-off-by: Benjamin Peterson <benjamin@python.org>
> > > 
> > > So, I tried:
> > > 
> > > Before your patch:
> > > 
> > >   # perf trace -e *mount* mount /dev/mapper/fedora-home /s
> > >      0.000 ( 4.335 ms): mount/3126 mount(dev_name: 0x55deecc4d480, 
> > > dir_name: 0x55deecc4d4a0, type: 0x55deecc53880, flags: 3236757504) = 0
> > >   #
> > >   # perf trace -e *mount* umount /dev/mapper/fedora-home /s
> > >          ? (         ): umount/3138  ... [continued]: umount2()) = 0
> > >     11.576 (umount:  0.004 ms): /s: not mounted.umount/
> > > 3138 umount2(arg0: 94501956754656, arg1: 0, arg2: 1, arg3: 
> > > 140051050083104, arg4: 4, arg5: 94501956755136) = -1 EINVAL Invalid 
> > > argument
> > >   #
> > > 
> > > After:
> > > 
> > > [root@jouet ~]# perf trace -e *mount* mount /dev/mapper/fedora-home /s
> > >      0.000 ( 1.213 ms): mount/5244 mount(dev_name: 0x5558c1169480, 
> > > dir_name: 0x5558c11694a0, type: 0x5558c116f880, flags: ) = 0
> > > [root@jouet ~]# perf trace -e *mount* umount /s
> > >      0.000 ( 9.241 ms): umount/5251 umount2(name: 
> > > 0x55f74a986480                                          ) = 0
> > > 
> > > The flags for mount got empty? Can you pleaes check that? I.e. using the
> > > default mount options, not specifying a 'bind' mount like you did.
> > 
> > That comes from these lines in syscall_arg__scnprintf_mount_flags:
> > 
> > if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
> > 	flags &= ~MS_MGC_MSK;
> > 
> > The reason for this is explained in the comment for do_mount in fs/namespace.c:
> > 
> > /*
> >  * Pre-0.97 versions of mount() didn't have a flags word.
> >  * When the flags word was introduced its top half was required
> >  * to have the magic value 0xC0ED, and this remained so until 2.4.0-test9.
> >  * Therefore, if this magic number is present, it carries no information
> >  * and must be discarded.
> > */
> > 
> > (I used a bind mount for my commit message example because a "default" 
> > mount() doesn't use any flags.)
> > 
> > > 
> > > I'm splitting this patch so that the aliasing of 'umount2' to 'umount'
> > > gets merged now,
> > > 
> > > Check my perf/core branch at:
> > > 
> > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git
> > 
> > LGTM. Thanks
> > 

  reply	other threads:[~2018-10-10 12:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28  3:53 [PATCH] perf trace beautify: Beautify flags of mount(2) and umount(2) Benjamin Peterson
2018-08-30 18:28 ` Arnaldo Carvalho de Melo
2018-08-30 21:50   ` Benjamin Peterson
2018-10-10  3:52     ` Benjamin Peterson
2018-10-10 12:55       ` Arnaldo Carvalho de Melo [this message]
2018-10-10 12:56         ` Arnaldo Carvalho de Melo
2018-10-23  2:40         ` Benjamin Peterson
2018-10-24 20:18           ` Arnaldo Carvalho de Melo
2018-10-26  6:23             ` Benjamin Peterson
2018-09-06 13:44 ` [tip:perf/core] perf trace beauty: Alias 'umount' to 'umount2' tip-bot for Benjamin Peterson

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=20181010125506.GH10775@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=benjamin@python.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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.