Re: [RFC PATCH v5 3/4] nvme: add simple copy support

2021-02-22 Thread Selva Jove
Matthew, Maximum Source Range Count (MSRC) is limited by u8. So the maximum number of source ranges is 256 (0 base value). The number of pages required to be sent to the device is at most 2. Since we are allocating the memory using kmalloc_array(), we would get a continuous physical segment. nvme_

Re: [RFC PATCH v5 3/4] nvme: add simple copy support

2021-02-19 Thread Matthew Wilcox
On Fri, Feb 19, 2021 at 06:15:16PM +0530, SelvaKumar S wrote: > + struct nvme_copy_range *range = NULL; [...] > + range = kmalloc_array(nr_range, sizeof(*range), > + GFP_ATOMIC | __GFP_NOWARN); [...] > + req->special_vec.bv_page = virt_to_page(range); > + req->sp

[RFC PATCH v5 3/4] nvme: add simple copy support

2021-02-19 Thread SelvaKumar S
Add support for TP 4065a ("Simple Copy Command"), v2020.05.04 ("Ratified") For device supporting native simple copy, this implementation accepts the payload passed from the block layer and convert payload to form simple copy command and submit to the device. Set the device copy limits to queue l