Re: [PATCH v3 0/4] Add binder state and statistics to binderfs

2019-09-27 Thread Christian Brauner
On Tue, Sep 03, 2019 at 09:16:51AM -0700, Hridya Valsaraju wrote:
> Currently, the only way to access binder state and
> statistics is through debugfs. We need a way to
> access the same even when debugfs is not mounted.
> These patches add a mount option to make this
> information available in binderfs without affecting
> its presence in debugfs. The following debugfs nodes
> will be made available in a binderfs instance when
> mounted with the mount option 'stats=global' or 'stats=local'.
> 
>  /sys/kernel/debug/binder/failed_transaction_log
>  /sys/kernel/debug/binder/proc
>  /sys/kernel/debug/binder/state
>  /sys/kernel/debug/binder/stats
>  /sys/kernel/debug/binder/transaction_log
>  /sys/kernel/debug/binder/transactions

I'm sitting in a talk from Jonathan about kernel documentation and what
I realized is that we forgot to update the documentation I wrote for
binderfs in Documentation/admin-guide/binderfs.rst to reflect the new
stats=global mount option. Would be great if we could add that after rc1
is out. Would you have time to do that, Hridya?

Should just be a new entry under:

Options
---
max
  binderfs instances can be mounted with a limit on the number of binder
  devices that can be allocated. The ``max=`` mount option serves as
  a per-instance limit. If ``max=`` is set then only  number
  of binder devices can be allocated in this binderfs instance.
stats
  

Thanks!
Christian
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 0/4] Add binder state and statistics to binderfs

2019-09-04 Thread Hridya Valsaraju
On Wed, Sep 4, 2019 at 7:20 AM Joel Fernandes  wrote:
>
> On September 4, 2019 7:19:35 AM EDT, Christian Brauner
>  wrote:
> >On Tue, Sep 03, 2019 at 09:16:51AM -0700, Hridya Valsaraju wrote:
> >> Currently, the only way to access binder state and
> >> statistics is through debugfs. We need a way to
> >> access the same even when debugfs is not mounted.
> >> These patches add a mount option to make this
> >> information available in binderfs without affecting
> >> its presence in debugfs. The following debugfs nodes
> >> will be made available in a binderfs instance when
> >> mounted with the mount option 'stats=global' or 'stats=local'.
> >>
> >>  /sys/kernel/debug/binder/failed_transaction_log
> >>  /sys/kernel/debug/binder/proc
> >>  /sys/kernel/debug/binder/state
> >>  /sys/kernel/debug/binder/stats
> >>  /sys/kernel/debug/binder/transaction_log
> >>  /sys/kernel/debug/binder/transactions
> >
> >Acked-by: Christian Brauner 
> >
> >Btw, I think your counting is off-by-one. :) We usually count the
> >initial send of a series as 0 and the first rework of that series as
> >v1.
> >I think you counted your initial send as v1 and the first rework as v2.
>
> Which is fine. I have done it both ways. Is this a rule written somewhere?
>
> >:)
> >
>
> If I am not mistaken, this is Hridya's first set of kernel patches.
> Congrats on landing it upstream and to everyone for reviews! (assuming
> nothing falls apart on the way to Linus tree).

I really hope so! Thank you Joel and everyone else for the reviews !


>
> thanks,
>
> - Joel
>
> [TLDR]
> My first kernel patch was 10 years ago to a WiFi driver when I was an
> intern at University. I was thrilled to have fixed a bug in network
> bridging code in the 802.11s stack. This is always a special moment so
> congrats again! ;-)
>
>
>
>
>
> >Christian
> >
> >>
> >> Hridya Valsaraju (4):
> >>   binder: add a mount option to show global stats
> >>   binder: Add stats, state and transactions files
> >>   binder: Make transaction_log available in binderfs
> >>   binder: Add binder_proc logging to binderfs
> >>
> >>  drivers/android/binder.c  |  95 ++-
> >>  drivers/android/binder_internal.h |  84 ++
> >>  drivers/android/binderfs.c| 255
> >++
> >>  3 files changed, 362 insertions(+), 72 deletions(-)
> >>
> >> --
> >> 2.23.0.187.g17f5b7556c-goog
> >>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 0/4] Add binder state and statistics to binderfs

2019-09-04 Thread Hridya Valsaraju
On Wed, Sep 4, 2019 at 8:12 AM Christian Brauner
 wrote:
>
> On Wed, Sep 04, 2019 at 04:49:03PM +0200, Greg Kroah-Hartman wrote:
> > On Wed, Sep 04, 2019 at 10:20:32AM -0400, Joel Fernandes wrote:
> > > On September 4, 2019 7:19:35 AM EDT, Christian Brauner
> > >  wrote:
> > > >On Tue, Sep 03, 2019 at 09:16:51AM -0700, Hridya Valsaraju wrote:
> > > >> Currently, the only way to access binder state and
> > > >> statistics is through debugfs. We need a way to
> > > >> access the same even when debugfs is not mounted.
> > > >> These patches add a mount option to make this
> > > >> information available in binderfs without affecting
> > > >> its presence in debugfs. The following debugfs nodes
> > > >> will be made available in a binderfs instance when
> > > >> mounted with the mount option 'stats=global' or 'stats=local'.
> > > >>
> > > >>  /sys/kernel/debug/binder/failed_transaction_log
> > > >>  /sys/kernel/debug/binder/proc
> > > >>  /sys/kernel/debug/binder/state
> > > >>  /sys/kernel/debug/binder/stats
> > > >>  /sys/kernel/debug/binder/transaction_log
> > > >>  /sys/kernel/debug/binder/transactions
> > > >
> > > >Acked-by: Christian Brauner 
> > > >
> > > >Btw, I think your counting is off-by-one. :) We usually count the
> > > >initial send of a series as 0 and the first rework of that series as
> > > >v1.
> > > >I think you counted your initial send as v1 and the first rework as v2.
> > >
> > > Which is fine. I have done it both ways. Is this a rule written somewhere?
> >
> > No where, I can count both ways, it's not a big deal :)
>
> It isn't documented (as many things we still do are) and it's not a big
> deal. But most people seem to be counting revisions starting from 0 it
> seems. I went looking for previous version to link to in the patch cover
> letter and was confused because I was missing a v1. :)
>
> Anyway, I'm happy that Hridya landed this! It was fun helping her the
> last couple of weeks on- and off-list. Thanks for getting this done! I
> hope we'll see even more patches in the future. :)

Thank you so much Christian and Todd for the guidance and thorough
reviews on the many patches I sent your way both on and off-list :) I
really appreciate it!

>
> Christian
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 0/4] Add binder state and statistics to binderfs

2019-09-04 Thread Christian Brauner
On Wed, Sep 04, 2019 at 04:49:03PM +0200, Greg Kroah-Hartman wrote:
> On Wed, Sep 04, 2019 at 10:20:32AM -0400, Joel Fernandes wrote:
> > On September 4, 2019 7:19:35 AM EDT, Christian Brauner
> >  wrote:
> > >On Tue, Sep 03, 2019 at 09:16:51AM -0700, Hridya Valsaraju wrote:
> > >> Currently, the only way to access binder state and
> > >> statistics is through debugfs. We need a way to
> > >> access the same even when debugfs is not mounted.
> > >> These patches add a mount option to make this
> > >> information available in binderfs without affecting
> > >> its presence in debugfs. The following debugfs nodes
> > >> will be made available in a binderfs instance when
> > >> mounted with the mount option 'stats=global' or 'stats=local'.
> > >>
> > >>  /sys/kernel/debug/binder/failed_transaction_log
> > >>  /sys/kernel/debug/binder/proc
> > >>  /sys/kernel/debug/binder/state
> > >>  /sys/kernel/debug/binder/stats
> > >>  /sys/kernel/debug/binder/transaction_log
> > >>  /sys/kernel/debug/binder/transactions
> > >
> > >Acked-by: Christian Brauner 
> > >
> > >Btw, I think your counting is off-by-one. :) We usually count the
> > >initial send of a series as 0 and the first rework of that series as
> > >v1.
> > >I think you counted your initial send as v1 and the first rework as v2.
> > 
> > Which is fine. I have done it both ways. Is this a rule written somewhere?
> 
> No where, I can count both ways, it's not a big deal :)

It isn't documented (as many things we still do are) and it's not a big
deal. But most people seem to be counting revisions starting from 0 it
seems. I went looking for previous version to link to in the patch cover
letter and was confused because I was missing a v1. :)

Anyway, I'm happy that Hridya landed this! It was fun helping her the
last couple of weeks on- and off-list. Thanks for getting this done! I
hope we'll see even more patches in the future. :)

Christian
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 0/4] Add binder state and statistics to binderfs

2019-09-04 Thread Greg Kroah-Hartman
On Wed, Sep 04, 2019 at 10:20:32AM -0400, Joel Fernandes wrote:
> On September 4, 2019 7:19:35 AM EDT, Christian Brauner
>  wrote:
> >On Tue, Sep 03, 2019 at 09:16:51AM -0700, Hridya Valsaraju wrote:
> >> Currently, the only way to access binder state and
> >> statistics is through debugfs. We need a way to
> >> access the same even when debugfs is not mounted.
> >> These patches add a mount option to make this
> >> information available in binderfs without affecting
> >> its presence in debugfs. The following debugfs nodes
> >> will be made available in a binderfs instance when
> >> mounted with the mount option 'stats=global' or 'stats=local'.
> >>
> >>  /sys/kernel/debug/binder/failed_transaction_log
> >>  /sys/kernel/debug/binder/proc
> >>  /sys/kernel/debug/binder/state
> >>  /sys/kernel/debug/binder/stats
> >>  /sys/kernel/debug/binder/transaction_log
> >>  /sys/kernel/debug/binder/transactions
> >
> >Acked-by: Christian Brauner 
> >
> >Btw, I think your counting is off-by-one. :) We usually count the
> >initial send of a series as 0 and the first rework of that series as
> >v1.
> >I think you counted your initial send as v1 and the first rework as v2.
> 
> Which is fine. I have done it both ways. Is this a rule written somewhere?

No where, I can count both ways, it's not a big deal :)

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 0/4] Add binder state and statistics to binderfs

2019-09-04 Thread Joel Fernandes
On September 4, 2019 7:19:35 AM EDT, Christian Brauner
 wrote:
>On Tue, Sep 03, 2019 at 09:16:51AM -0700, Hridya Valsaraju wrote:
>> Currently, the only way to access binder state and
>> statistics is through debugfs. We need a way to
>> access the same even when debugfs is not mounted.
>> These patches add a mount option to make this
>> information available in binderfs without affecting
>> its presence in debugfs. The following debugfs nodes
>> will be made available in a binderfs instance when
>> mounted with the mount option 'stats=global' or 'stats=local'.
>>
>>  /sys/kernel/debug/binder/failed_transaction_log
>>  /sys/kernel/debug/binder/proc
>>  /sys/kernel/debug/binder/state
>>  /sys/kernel/debug/binder/stats
>>  /sys/kernel/debug/binder/transaction_log
>>  /sys/kernel/debug/binder/transactions
>
>Acked-by: Christian Brauner 
>
>Btw, I think your counting is off-by-one. :) We usually count the
>initial send of a series as 0 and the first rework of that series as
>v1.
>I think you counted your initial send as v1 and the first rework as v2.

Which is fine. I have done it both ways. Is this a rule written somewhere?

>:)
>

If I am not mistaken, this is Hridya's first set of kernel patches.
Congrats on landing it upstream and to everyone for reviews! (assuming
nothing falls apart on the way to Linus tree).

thanks,

- Joel

[TLDR]
My first kernel patch was 10 years ago to a WiFi driver when I was an
intern at University. I was thrilled to have fixed a bug in network
bridging code in the 802.11s stack. This is always a special moment so
congrats again! ;-)





>Christian
>
>>
>> Hridya Valsaraju (4):
>>   binder: add a mount option to show global stats
>>   binder: Add stats, state and transactions files
>>   binder: Make transaction_log available in binderfs
>>   binder: Add binder_proc logging to binderfs
>>
>>  drivers/android/binder.c  |  95 ++-
>>  drivers/android/binder_internal.h |  84 ++
>>  drivers/android/binderfs.c| 255
>++
>>  3 files changed, 362 insertions(+), 72 deletions(-)
>>
>> --
>> 2.23.0.187.g17f5b7556c-goog
>>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 0/4] Add binder state and statistics to binderfs

2019-09-04 Thread Christian Brauner
On Tue, Sep 03, 2019 at 09:16:51AM -0700, Hridya Valsaraju wrote:
> Currently, the only way to access binder state and
> statistics is through debugfs. We need a way to
> access the same even when debugfs is not mounted.
> These patches add a mount option to make this
> information available in binderfs without affecting
> its presence in debugfs. The following debugfs nodes
> will be made available in a binderfs instance when
> mounted with the mount option 'stats=global' or 'stats=local'.
> 
>  /sys/kernel/debug/binder/failed_transaction_log
>  /sys/kernel/debug/binder/proc
>  /sys/kernel/debug/binder/state
>  /sys/kernel/debug/binder/stats
>  /sys/kernel/debug/binder/transaction_log
>  /sys/kernel/debug/binder/transactions

Acked-by: Christian Brauner 

Btw, I think your counting is off-by-one. :) We usually count the
initial send of a series as 0 and the first rework of that series as v1.
I think you counted your initial send as v1 and the first rework as v2. :)

Christian

> 
> Hridya Valsaraju (4):
>   binder: add a mount option to show global stats
>   binder: Add stats, state and transactions files
>   binder: Make transaction_log available in binderfs
>   binder: Add binder_proc logging to binderfs
> 
>  drivers/android/binder.c  |  95 ++-
>  drivers/android/binder_internal.h |  84 ++
>  drivers/android/binderfs.c| 255 ++
>  3 files changed, 362 insertions(+), 72 deletions(-)
> 
> -- 
> 2.23.0.187.g17f5b7556c-goog
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 0/4] Add binder state and statistics to binderfs

2019-09-03 Thread Hridya Valsaraju
Currently, the only way to access binder state and
statistics is through debugfs. We need a way to
access the same even when debugfs is not mounted.
These patches add a mount option to make this
information available in binderfs without affecting
its presence in debugfs. The following debugfs nodes
will be made available in a binderfs instance when
mounted with the mount option 'stats=global' or 'stats=local'.

 /sys/kernel/debug/binder/failed_transaction_log
 /sys/kernel/debug/binder/proc
 /sys/kernel/debug/binder/state
 /sys/kernel/debug/binder/stats
 /sys/kernel/debug/binder/transaction_log
 /sys/kernel/debug/binder/transactions

Hridya Valsaraju (4):
  binder: add a mount option to show global stats
  binder: Add stats, state and transactions files
  binder: Make transaction_log available in binderfs
  binder: Add binder_proc logging to binderfs

 drivers/android/binder.c  |  95 ++-
 drivers/android/binder_internal.h |  84 ++
 drivers/android/binderfs.c| 255 ++
 3 files changed, 362 insertions(+), 72 deletions(-)

-- 
2.23.0.187.g17f5b7556c-goog

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel