Where userland read/write requests, whcih is larger than MAXPHYS, are splitted?

Alexander Motin mav at FreeBSD.org
Fri Dec 10 14:45:58 UTC 2010


Lev Serebryakov wrote:
>    I'm  digging  thought  GEOM/IO  code  and  can not find place, where
>  requests  from  userland to read more than MAXPHYS bytes, is splitted
>  into  several "struct bio"?
> 
>       It seems, that these children request are issued one-by-one, not in
>  parallel,   am  I  right?  Why?  It  breaks  down  parallelism,  when
>  underlying GEOM can process several requests simoltaneously?

AFAIK first time requests from user-land broken to MAXPHYS-size pieces
by physio() before entering GEOM. Requests are indeed serialized here, I
suppose to limit KVA that thread can harvest, but IMHO it could be
reconsidered.

One more split happens (when needed) at geom_disk module to honor disk
driver's maximal I/O size. There is no serialization. Most of ATA/SATA
drivers in 8-STABLE support I/O up to at least min(512K, MAXPHYS) - 128K
by default. Many SCSI drivers still limited by DFLTPHYS - 64K.

-- 
Alexander Motin


More information about the freebsd-hackers mailing list