All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Peng Tao <bergwolf@gmail.com>
Cc: Oleg Drokin <green@linuxhacker.ru>,
	Evgeny Budilovsky <budevg@gmail.com>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	Andreas Dilger <andreas.dilger@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lai Siyao <lai.siyao@intel.com>
Subject: Re: [PATCH] staging/lustre: use rcu_dereference to access rcu protected current->real_parent field
Date: Sat, 9 Aug 2014 07:04:26 -0700	[thread overview]
Message-ID: <20140809140426.GA20995@kroah.com> (raw)
In-Reply-To: <CA+a=Yy4SqXSe667DkU3KA80tAt5D=KG-9mfccvEwtJzuFr6vBA@mail.gmail.com>

On Sat, Aug 09, 2014 at 07:05:46PM +0800, Peng Tao wrote:
> On Fri, Aug 8, 2014 at 1:32 PM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Fri, Aug 08, 2014 at 01:06:15AM -0400, Oleg Drokin wrote:
> >>
> >> On Aug 8, 2014, at 12:42 AM, Greg Kroah-Hartman wrote:
> >>
> >> > On Fri, Aug 08, 2014 at 12:03:20AM -0400, Oleg Drokin wrote:
> >> >> Hello!
> >> >>
> >> >> On Aug 7, 2014, at 11:49 PM, Greg Kroah-Hartman wrote:
> >> >>>>
> >> >>>> This is not a critical bug and in the worst case the code here may
> >> >>>> cause miss of statistics counter increase.
> >> >>>> This is why I think it is not worth to backport the patch at all.
> >> >>> You are right, and if this is just for some random "statistics" file,
> >> >>> can we just delete the whole function?
> >> >>
> >> >> I hope not!
> >> >> This is used all around the client to tally up various operations executed counts.
> >> > Why would you do that?  Why would they care?
> >>
> >> We would do that to provide information on the client operations performed.
> >> They would care because they are interested in what particular clients might be doing.
> >>
> >> >> The statistic is then used by various userspace monitoring tools.
> >> > Why not use the in-kernel monitoring tools instead of creating your own?
> >> > What does userspace do with that information?
> >>
> >> We don't really control the userspace tools. People write tools to suit their needs
> >> to monitor loads, see odd things the end users are doing or possibly for some
> >> debugging even.
> >> Correlating these numbers with what server sees also proves useful at times
> >> (write combining for example).
> >>
> >> Here's a sample of output of a recently mounted client that I poked on a bit (the lines starting with # are my comments):
> >> # cat /proc/fs/lustre/llite/lustre-ffff88008dde27f0/stats
> >> snapshot_time             1407473168.466102 secs.usecs
> >> read_bytes                1 samples [bytes] 0 0 0
> >> write_bytes               4 samples [bytes] 2 7 19
> >> osc_write                 4 samples [bytes] 2 7 19
> >> # The bytes counts show you minimum, maximum of writes seen and total number of bytes read-written.
> >> # Lustre (and many other network filesystems) is very sensitive to small IO, esp. reads so it's good
> >> # to know if you have a lot of it.
> >> open                      6 samples [regs]
> >> # The "regs" type just shows you how many of given type operations were performed since last statistic reset.
> >> # Frequently that allows people to guess where does high load come from on a particular client when
> >> # it's otherwise not obvious because not a lot of cpu is used.
> >> # Some operations are heavier than others too.
> >> close                     6 samples [regs]
> >> readdir                   4 samples [regs]
> >> setattr                   1 samples [regs]
> >> truncate                  4 samples [regs]
> >> getattr                   7 samples [regs]
> >> create                    1 samples [regs]
> >> alloc_inode               1 samples [regs]
> >> getxattr                  8 samples [regs]
> >> inode_permission          28 samples [regs]
> >>
> >> As more operations types are seen the list grows.
> >> Then there are also specific stats for readahead (data and metadata) so that interested people can make informed
> >> decisions on the tuning there should they be unsatisfied with default settings.
> >>
> >> I am not sure there's a similar mechanism in the kernel already that
> >> would allow us to get this sort of data easily all in one place?
> >
> > perf should show you this, if not, please add the functionality there.
> > A filesystem is not the place to have performance monitoring code, this
> > needs to be removed before it can be moved out of staging.  Please work
> > with the trace/perf developers on this if there is something lacking
> > there.
> >
> nfs and nfsd track rpc ops statistics and export them via
> /proc/self/mountstats, e.g.,
> 
> device 192.168.214.141:/d9691564-432b-11e2-8e5d-8b7acf882df3 mounted
> on /mnt/pnfsd with fstype nfs4 statvers=1.1
>         opts: rw,vers=4.1,rsize=262144,wsize=262144,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.214.128,local_lock=none
>         age:    15426
>         impl_id:        name='',domain='',date='0,0'
>         caps:   caps=0x3ffff,wtmult=512,dtsize=32768,bsize=0,namlen=255
>         nfsv4:  bm0=0xfdffbfff,bm1=0x40f9be3e,bm2=0x803,acl=0x3,sessions
>         sec:    flavor=1,pseudoflavor=1
>         events: 82474 12159573 9527 109202 7574 10119 16289648 3634869
> 10938 108551 2084272 182492 13646 7700 52594 60832 8829 48985 0 6564
> 1459053 66 0 0 0 289315 376376
>         bytes:  11526471786 9942294760 3280371712 3278274560
> 14578366831 11710126268 2782400 2084272
>         RPC iostats version: 1.0  p/v: 100003/4 (nfs)
>         xprt:   tcp 859 0 2 0 12 408031 407999 29 2169734 0 32 2496 310753
>         per-op statistics
>                 NULL: 0 0 0 0 0 0 0 0
>                 READ: 289327 289326 0 35877640 14615129136 63609 1800007 1893161
>                WRITE: 376352 376360 0 11759732976 51184768 6698277
> 2246445 8978314
>               COMMIT: 3076 3076 0 381424 393728 1827 15450 17329
>                 OPEN: 24926 24926 0 7329252 8968144 1373312 1794621 3169378
> <snip...>
> 
> Why Lustre cannot do similar things?

Because maybe these stats preceed the introduction of perf and other
tracing/debug tools?  I don't know, it's really low down on the list of
reasons why lustre can't be merged out of staging at the moment, you all
have much bigger issues to address first.

thanks,

greg k-h

  reply	other threads:[~2014-08-09 14:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 18:22 [PATCH] staging/lustre: use rcu_dereference to access rcu protected current->real_parent field Evgeny Budilovsky
2014-08-06 21:42 ` Greg Kroah-Hartman
2014-08-07 11:13   ` Evgeny Budilovsky
2014-08-08  3:49     ` Greg Kroah-Hartman
2014-08-08  4:03       ` Oleg Drokin
2014-08-08  4:42         ` Greg Kroah-Hartman
2014-08-08  5:06           ` Oleg Drokin
2014-08-08  5:32             ` Greg Kroah-Hartman
2014-08-09 11:05               ` Peng Tao
2014-08-09 14:04                 ` Greg Kroah-Hartman [this message]
2014-08-09 14:34                   ` Oleg Drokin
2014-08-09 15:47                     ` Greg Kroah-Hartman
2014-08-12  1:44                       ` Oleg Drokin
2014-08-12  2:39                         ` Greg Kroah-Hartman

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=20140809140426.GA20995@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andreas.dilger@intel.com \
    --cc=bergwolf@gmail.com \
    --cc=budevg@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=green@linuxhacker.ru \
    --cc=lai.siyao@intel.com \
    --cc=linux-kernel@vger.kernel.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.