All of lore.kernel.org
 help / color / mirror / Atom feed
* iotop like tool for mtd devices
@ 2018-02-07 13:40 Marc Kleine-Budde
  2018-02-07 18:21 ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2018-02-07 13:40 UTC (permalink / raw)
  To: linux-mtd


[-- Attachment #1.1: Type: text/plain, Size: 433 bytes --]

Hello,

as iotop doesn't work on (NAND) mtd devices, is there a tool, or an API
to query the number of read or written bytes per mtd?

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: iotop like tool for mtd devices
  2018-02-07 13:40 iotop like tool for mtd devices Marc Kleine-Budde
@ 2018-02-07 18:21 ` Marc Kleine-Budde
  2018-02-07 19:31   ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2018-02-07 18:21 UTC (permalink / raw)
  To: linux-mtd


[-- Attachment #1.1: Type: text/plain, Size: 603 bytes --]

On 02/07/2018 02:40 PM, Marc Kleine-Budde wrote:
> as iotop doesn't work on (NAND) mtd devices, is there a tool, or an API
> to query the number of read or written bytes per mtd?

For the record: switching on all the needed kernel config options as
stated in the iotop manpage helps a lot.

sorry for the noise,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: iotop like tool for mtd devices
  2018-02-07 18:21 ` Marc Kleine-Budde
@ 2018-02-07 19:31   ` Marc Kleine-Budde
  2018-02-08  9:30     ` Richard Weinberger
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2018-02-07 19:31 UTC (permalink / raw)
  To: linux-mtd


[-- Attachment #1.1: Type: text/plain, Size: 1097 bytes --]

On 02/07/2018 07:21 PM, Marc Kleine-Budde wrote:
> On 02/07/2018 02:40 PM, Marc Kleine-Budde wrote:
>> as iotop doesn't work on (NAND) mtd devices, is there a tool, or an API
>> to query the number of read or written bytes per mtd?
> 
> For the record: switching on all the needed kernel config options as
> stated in the iotop manpage helps a lot.

Update:

The kernel makes the information available at /proc/$$/io. However
"read_bytes" and "write_bytes" seems not to be accurate for mtd devices.

Poking around a bit in the kernel code makes me wonder if some
task_io_account_read(), task_io_account_write() at the right places
would make the accounting better?

Marc

http://lxr.bootlin.com/linux/latest/ident/task_io_account_read
http://lxr.bootlin.com/linux/latest/ident/task_io_account_write

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: iotop like tool for mtd devices
  2018-02-07 19:31   ` Marc Kleine-Budde
@ 2018-02-08  9:30     ` Richard Weinberger
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2018-02-08  9:30 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: linux-mtd

Marc,

On Wed, Feb 7, 2018 at 8:31 PM, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> On 02/07/2018 07:21 PM, Marc Kleine-Budde wrote:
>> On 02/07/2018 02:40 PM, Marc Kleine-Budde wrote:
>>> as iotop doesn't work on (NAND) mtd devices, is there a tool, or an API
>>> to query the number of read or written bytes per mtd?
>>
>> For the record: switching on all the needed kernel config options as
>> stated in the iotop manpage helps a lot.
>
> Update:
>
> The kernel makes the information available at /proc/$$/io. However
> "read_bytes" and "write_bytes" seems not to be accurate for mtd devices.
>
> Poking around a bit in the kernel code makes me wonder if some
> task_io_account_read(), task_io_account_write() at the right places
> would make the accounting better?

I'd guess so.
One thing we need to consider are stacked MTDs, here the accounting
should not happen multiple times.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-08  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-07 13:40 iotop like tool for mtd devices Marc Kleine-Budde
2018-02-07 18:21 ` Marc Kleine-Budde
2018-02-07 19:31   ` Marc Kleine-Budde
2018-02-08  9:30     ` Richard Weinberger

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.