Re: [PATCH v2 0/4] io_uring/rsrc: coalescing multi-hugepage registered buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Actually here it does account an entire folio. The j is just
array index.

> It seems like you can just call io_buffer_account_pin()
> instead.
>
> On that note, you shouldn't duplicate code in either case,
> just treat the normal discontig pages case as folios of
> shift=PAGE_SHIFT.
>
> Either just plain reuse or adjust io_buffer_account_pin()
> instead of io_coalesced_buffer_account_pin().
> io_coalesced_imu_alloc() should also go away.
>
> io_sqe_buffer_register() {
> 	struct io_imu_folio_data data;
>
>	if (!io_sqe_buffer_try_coalesce(pages, folio_data)) {
>		folio_data.shift = PAGE_SHIFT;
>		...
>	}
>	
>	io_buffer_account_pin(pages, &data);
>	imu->data = uaddr;
>	...
> }

Will remove them.

Thanks,
Chenliang Li




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux