[RESENDING, BECAUSE REJECTED BY THE VGER] > Il giorno 27 ott 2017, alle ore 08:22, Paolo Valente <paolo.valente@xxxxxxxxxx> ha scritto: > > > > Il 26/ott/2017 06:32 AM, "Jens Axboe" <axboe@xxxxxxxxx> ha scritto: > On 10/24/2017 08:10 AM, Paolo Valente wrote: > > > >> Il giorno 24 ott 2017, alle ore 08:28, Sitsofe Wheeler <sitsofe@xxxxxxxxx> ha scritto: > >> > >> Hi, > >> > >> If memory serves it's actually slightly more complicated. If you are > >> using loops=<number> then I *think* (you'll have to check) you will > >> find that invalidation happens once per each loop start. However when > >> you use time_based to do the repetition there is essentially only one > >> "loop" (even though the job goes on forever) so loop actions only > >> happen right at the start of the job with that option (that's why I > >> put the scare quotes around "beginning" ;-). > >> > > > > Thanks for this additional, useful piece of information. Actually, > > this further, possibly different caching behavior makes me think that > > some extra comment in the manpage might be helpful. > > Would probably make sense to change 'invalidate' to be a range of > possible values: > > 0 As it is now, never invalidate > 1 As it is now, invalidate initially > once Same as '1', invalidate initially / once > open New value, invalidate on every open > close New value, invalidate on close > > as I can definitely see reasons why you would want to invalidate every > time you open the file. > > To do that, the 'invalidate' option should be changed from a > FIO_OPT_BOOL to a FIO_OPT_STR, and the above possible values should be > added as posval[] for that option. > > Compliment that with the an enum of ranges for the ovals: > > enum { > FIO_FILE_INVALIDATE_OFF = 0, > FIO_FILE_INVALIDATE_ONCE, > FIO_FILE_INVALIDATE_OPEN, > FIO_FILE_INVALIDATE_CLOSE > }; > > Hope this makes sense, should be trivial to add as most of the work is > already documented in this email :-). The remaining bits is just calling > file_invalidate_cache() in the proper locations, > td_io_{open,close}_file() would be prime candidates. > > IMO this solution would make things both clearer and more flexible > > Thanks, > Paolo > > -- > Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html