• J
    block/xen-blkfront: Make it running on 64KB page granularity · c004a6fe
    Julien Grall 提交于
    The PV block protocol is using 4KB page granularity. The goal of this
    patch is to allow a Linux using 64KB page granularity using block
    device on a non-modified Xen.
    
    The block API is using segment which should at least be the size of a
    Linux page. Therefore, the driver will have to break the page in chunk
    of 4K before giving the page to the backend.
    
    When breaking a 64KB segment in 4KB chunks, it is possible that some
    chunks are empty. As the PV protocol always require to have data in the
    chunk, we have to count the number of Xen page which will be in use and
    avoid sending empty chunks.
    
    Note that, a pre-defined number of grants are reserved before preparing
    the request. This pre-defined number is based on the number and the
    maximum size of the segments. If each segment contains a very small
    amount of data, the driver may reserve too many grants (16 grants is
    reserved per segment with 64KB page granularity).
    
    Furthermore, in the case of persistent grants we allocate one Linux page
    per grant although only the first 4KB of the page will be effectively
    in use. This could be improved by sharing the page with multiple grants.
    Signed-off-by: NJulien Grall <julien.grall@citrix.com>
    Acked-by: NRoger Pau Monné <roger.pau@citrix.com>
    Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
    c004a6fe
xen-blkfront.c 60.9 KB