Re: [PATCH 1/2] xen/privcmd: Corrected error handling path and mark pages dirty

2020-06-26 Thread Souptick Joarder
On Fri, Jun 26, 2020 at 11:22 AM Jürgen Groß wrote: > > On 25.06.20 05:02, Souptick Joarder wrote: > > Previously, if lock_pages() end up partially mapping pages, it used > > to return -ERRNO due to which unlock_pages() have to go through > > each pages[i] till *nr_pages* to validate them. This

Re: [PATCH 1/2] xen/privcmd: Corrected error handling path and mark pages dirty

2020-06-25 Thread Jürgen Groß
On 25.06.20 05:02, Souptick Joarder wrote: Previously, if lock_pages() end up partially mapping pages, it used to return -ERRNO due to which unlock_pages() have to go through each pages[i] till *nr_pages* to validate them. This can be avoided by passing correct number of partially mapped pages &

Re: [PATCH 1/2] xen/privcmd: Corrected error handling path and mark pages dirty

2020-06-25 Thread Souptick Joarder
On Fri, Jun 26, 2020 at 5:01 AM Boris Ostrovsky wrote: > > On 6/24/20 11:02 PM, Souptick Joarder wrote: > > Previously, if lock_pages() end up partially mapping pages, it used > > to return -ERRNO due to which unlock_pages() have to go through > > each pages[i] till *nr_pages* to validate them.

Re: [PATCH 1/2] xen/privcmd: Corrected error handling path and mark pages dirty

2020-06-25 Thread Boris Ostrovsky
On 6/24/20 11:02 PM, Souptick Joarder wrote: > Previously, if lock_pages() end up partially mapping pages, it used > to return -ERRNO due to which unlock_pages() have to go through > each pages[i] till *nr_pages* to validate them. This can be avoided > by passing correct number of partially mapped

[PATCH 1/2] xen/privcmd: Corrected error handling path and mark pages dirty

2020-06-24 Thread Souptick Joarder
Previously, if lock_pages() end up partially mapping pages, it used to return -ERRNO due to which unlock_pages() have to go through each pages[i] till *nr_pages* to validate them. This can be avoided by passing correct number of partially mapped pages & -ERRNO separately, while returning from