Messages in this thread | | | Date | Fri, 28 Apr 2006 08:29:27 +0530 | From | Balbir Singh <> | Subject | Re: [Lse-tech] Re: [Patch 5/8] taskstats interface |
| |
> 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |