Re: [PATCH v2 1/7] fault-inject: add support for static keys around fault injection sites

2024-06-25 Thread Steven Rostedt
On Thu, 20 Jun 2024 00:48:55 +0200 Vlastimil Babka wrote: > +static int debugfs_prob_set(void *data, u64 val) > +{ > + struct fault_attr *attr = data; > + > + mutex_lock(_mutex); > + > + if (attr->active) { > + if (attr->probability != 0 && val == 0) { > +

[PATCH v2 1/7] fault-inject: add support for static keys around fault injection sites

2024-06-19 Thread Vlastimil Babka
Some fault injection sites are placed in hotpaths and incur overhead even if not enabled, due to one or more function calls leading up to should_fail_ex() that returns false due to attr->probability == 0. This overhead can be eliminated if the outermost call into the checks is guarded with a