[dm-devel] [PATCH 7/7] dm: optimize clone_rq() when track_peak_rq_based_ios is disabled

Mikulas Patocka mpatocka at redhat.com
Thu Sep 12 23:30:59 UTC 2013



On Thu, 12 Sep 2013, Mike Snitzer wrote:

> On Thu, Sep 12 2013 at  7:00pm -0400,
> Mikulas Patocka <mpatocka at redhat.com> wrote:
> 
> > 
> > 
> > On Thu, 12 Sep 2013, Mike Snitzer wrote:
> > 
> > > Make use of static keys to eliminate the relevant branch in clone_rq()
> > > when dm_mod's 'track_peak_rq_based_ios' paramter is set to 0 (disabled).
> > > 
> > > Even if 'track_peak_rq_based_ios' is set to 0 it will not take effect
> > > until the next request-based table reload.  Once it is disabled the
> > > 'peak_rq_based_ios' parameter will be reset to 0.
> > 
> > This patch changes it so that the value track_peak_rq_based_ios is sampled 
> > only when reloading a table. I think it will be confusing to the user if 
> > he changes the value, but the change doesn't take effect until something 
> > reloads some table.
> 
> Well we need to be able to notice the change but I do not wish to do so
> in a performance critical path (which clone_rq is).

I think one condition isn't that bad so there is no need to use static 
keys.

If you want to use static keys, you need to refresh them in some place 
that it called regularly.

Mikulas




More information about the dm-devel mailing list