Re: [Lse-tech] Re: [Patch 5/8] taskstats interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> If we envision a need of it in the future, we'd better put it in
> today. It would be nice to have the revision number at beginning of
> the struct. Shailabh's instruction says to add new field after existing
> fields.
>

Yes, true. It does not hurt to have a version number for taskstats.
I will add it in.

<snip>
 
> 
> I am sorry that i did not make myself clear. My suggestion of using
> the bitmask payload info is to be combined with #ifdef CONFIG_* to
> eliminate unnecessary fields from the traffic. I am concerned about
> losing data due to application not reading data fast enough.
> 
> Well, we can revisit this suggestion when we start losing data
> though. ;-)

Like Shailabh said #ifdef CONFIG_* adds complexity for userspace parsing
of the structure, but if it helps avoid sending unnecessary data we
can consider using that approach. 

Would something like the structure below be useful?

struct csastats {
#if defined(CONFIG_CSA) || defined(CONFIG_CSA_MODULE)
       char    acctent[sizeof(struct acctcsa) +
                       sizeof(struct acctmem) +
                       sizeof(struct acctio)];
       int     filled;
#endif
};

The filled member can be a bool or an int to indicate that the structure
contains meaningful data and the CONFIG_* is used to control the
inclusion of meaningful fields. Instead of using a bitmap we use
the filled member.

Is this what you had in mind?

-- 
					<---	Balbir
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux