Re: Suggested dual human/binary interface for proc/devfs

From: Marcus Meissner (Marcus.Meissner@caldera.de)
Date: Mon Apr 10 2000 - 02:04:07 EST


In article <D5E932F578EBD111AC3F00A0C96B1E6F0545C9AD@orsmsx31.jf.intel.com> you wrote:
> So with one value per "file," how do you handle the
> well-known problem of inconsistent data, i.e.,
> one or more values being updated, program reads
> file value(s), some more value(s) updated, program
> reams some more value(s)?

> Is there also a well-known solution to this?

> Example: eth0.receive.packets is updated on a new packet,
> but eth0.receive.bytes is not yet updated. A program
> reads eth0.receive.packets and eth0.receive.bytes.
> These values are inconsistent, they do not represent
> a snapshot of the statistics (or whatever data is
> interesting).

Is this even guaranteed right now?
I don't know the VFS, but it appears to me after brief look over it
that the code could be accessed without the kernel lock held. And then
an interrupt could trigger within sprintf_stats(), also deadjusting
bytes/packets.

Ciao, Marcus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:13 EST