Message ID | 20241119002815.600608-18-bvanassche@acm.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Improve write performance for zoned UFS devices | expand |
On 11/19/24 09:28, Bart Van Assche wrote: > Apply the convention that is followed elsewhere in the block layer: only > declare functions inline if these are in the hot path. > > Signed-off-by: Bart Van Assche <bvanassche@acm.org> I do not really see the point... Anyway, looks OK. Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
On 11/18/24 11:55 PM, Damien Le Moal wrote:
> I do not really see the point... Anyway, looks OK.
Hi Damien,
One of the approaches I used to debug this patch series is to add
trace_printk() calls to track zwplug state changes. trace_printk()
reports the function name in front of the information in its argument
list. I noticed that the function name reported by trace_printk() is
incorrect for inlined functions. Hence this patch.
Thanks,
Bart.
On 11/20/24 06:20, Bart Van Assche wrote: > On 11/18/24 11:55 PM, Damien Le Moal wrote: >> I do not really see the point... Anyway, looks OK. > Hi Damien, > > One of the approaches I used to debug this patch series is to add > trace_printk() calls to track zwplug state changes. trace_printk() > reports the function name in front of the information in its argument > list. I noticed that the function name reported by trace_printk() is > incorrect for inlined functions. Hence this patch. Maybe add this explanation to the commit message ? It does make sense to no inline these function with tracing. > > Thanks, > > Bart.
diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 17fe40db1888..2b4783026450 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -558,8 +558,8 @@ static struct blk_zone_wplug *disk_get_and_lock_zone_wplug(struct gendisk *disk, return zwplug; } -static inline void blk_zone_wplug_bio_io_error(struct blk_zone_wplug *zwplug, - struct bio *bio) +static void blk_zone_wplug_bio_io_error(struct blk_zone_wplug *zwplug, + struct bio *bio) { struct request_queue *q = zwplug->disk->queue; @@ -580,8 +580,8 @@ static void disk_zone_wplug_abort(struct blk_zone_wplug *zwplug) blk_zone_wplug_bio_io_error(zwplug, bio); } -static inline void disk_zone_wplug_set_error(struct gendisk *disk, - struct blk_zone_wplug *zwplug) +static void disk_zone_wplug_set_error(struct gendisk *disk, + struct blk_zone_wplug *zwplug) { unsigned long flags; @@ -607,8 +607,8 @@ static inline void disk_zone_wplug_set_error(struct gendisk *disk, spin_unlock_irqrestore(&disk->zone_wplugs_lock, flags); } -static inline void disk_zone_wplug_clear_error(struct gendisk *disk, - struct blk_zone_wplug *zwplug) +static void disk_zone_wplug_clear_error(struct gendisk *disk, + struct blk_zone_wplug *zwplug) { unsigned long flags; @@ -1597,7 +1597,7 @@ void disk_free_zone_resources(struct gendisk *disk) disk->nr_zones = 0; } -static inline bool disk_need_zone_resources(struct gendisk *disk) +static bool disk_need_zone_resources(struct gendisk *disk) { /* * All mq zoned devices need zone resources so that the block layer
Apply the convention that is followed elsewhere in the block layer: only declare functions inline if these are in the hot path. Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- block/blk-zoned.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)