> On 2021/06/04 16:53, Changheun Lee wrote: > >> On 2021/06/04 14:22, Changheun Lee wrote: > >>> + * @q: the request queue for the device > >>> + * @bytes : bio max bytes to be set > >>> + * > >>> + * Description: > >>> + * Set proper bio max size to optimize queue operating. > >>> + **/ > >>> +void blk_queue_max_bio_bytes(struct request_queue *q, unsigned int bytes) > >>> +{ > >>> + struct queue_limits *limits = &q->limits; > >>> + unsigned int max_bio_bytes = round_up(bytes, PAGE_SIZE); > >>> + > >>> + limits->max_bio_bytes = max_t(unsigned int, max_bio_bytes, > >>> + BIO_MAX_VECS * PAGE_SIZE); > >>> +} > >>> +EXPORT_SYMBOL(blk_queue_max_bio_bytes); > >> > >> Setting of the stacked limits is still missing. > > > > max_bio_bytes for stacked device is just default(UINT_MAX) in this patch. > > Because blk_set_stacking_limits() call blk_set_default_limits(). > > I'll work continue for stacked device after this patchowork. > > Why ? Without that added now, anybody using this performance fix will see no > benefits if a device mapper is used. The stacking limit should be super simple. > In blk_stack_limits(), just add: > > t->max_bio_bytes = min(t->max_bio_bytes, b->max_bio_bytes); > > > -- > Damien Le Moal > Western Digital Research I had tried like as your comment at first. But I got many feedbacks that applying for all device is not good idea. So I'll try to control bio size in each stacked driver like as setting max_bio_bytes in LLD as you recommended. I'm trying to find some target stacked devices to contorl bio size like as dm-crypt, dm-liner, ... etc. And I'll try to find some method to control bio max size include using of blk_queue_max_bio_bytes(). Thank you, Changheun Lee