Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-21 Thread Jan Beulich
On 21.02.2024 10:34, Julien Grall wrote: > Hi, > > On 20/02/2024 12:25, Jan Beulich wrote: >> On 20.02.2024 12:52, Julien Grall wrote: >>> Hi Jan, >>> >>> On 20/02/2024 08:26, Jan Beulich wrote: On 19.02.2024 23:22, Julien Grall wrote: > Title: I would add 'gnttab:' to clarify which subsy

Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-21 Thread Julien Grall
Hi, On 20/02/2024 12:25, Jan Beulich wrote: On 20.02.2024 12:52, Julien Grall wrote: Hi Jan, On 20/02/2024 08:26, Jan Beulich wrote: On 19.02.2024 23:22, Julien Grall wrote: Title: I would add 'gnttab:' to clarify which subsystem you are modifying. That's how I actually have it here; it's

Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-21 Thread George Dunlap
On Wed, Feb 21, 2024 at 3:17 PM Jan Beulich wrote: > > #1 by itself is probably enough to counterindicate this kind of > > behavior. Add them together, and I'm inclined to say that we should > > write a policy against such optimizations, without specific > > justifications. > > It's not like I di

Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-20 Thread Jan Beulich
On 21.02.2024 03:32, George Dunlap wrote: > On Tue, Feb 20, 2024 at 4:26 PM Jan Beulich wrote: +if ( (cflush->offset | cflush->length) > PAGE_SIZE || >>> >>> This is confusing. I understand you are trying to force the compiler to >>> optimize. But is it really worth it? After all, the res

Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-20 Thread George Dunlap
On Tue, Feb 20, 2024 at 4:26 PM Jan Beulich wrote: > >> +if ( (cflush->offset | cflush->length) > PAGE_SIZE || > > > > This is confusing. I understand you are trying to force the compiler to > > optimize. But is it really worth it? After all, the rest of operation > > will outweight this check

Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-20 Thread Jan Beulich
On 20.02.2024 12:52, Julien Grall wrote: > Hi Jan, > > On 20/02/2024 08:26, Jan Beulich wrote: >> On 19.02.2024 23:22, Julien Grall wrote: >>> Title: I would add 'gnttab:' to clarify which subsystem you are modifying. >> >> That's how I actually have it here; it's not clear to me why I lost the >>

Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-20 Thread Julien Grall
Hi Jan, On 20/02/2024 08:26, Jan Beulich wrote: On 19.02.2024 23:22, Julien Grall wrote: Title: I would add 'gnttab:' to clarify which subsystem you are modifying. That's how I actually have it here; it's not clear to me why I lost the prefix when sending. On 05/02/2024 11:03, Jan Beulich w

Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-20 Thread Jan Beulich
On 19.02.2024 23:22, Julien Grall wrote: > Title: I would add 'gnttab:' to clarify which subsystem you are modifying. That's how I actually have it here; it's not clear to me why I lost the prefix when sending. > On 05/02/2024 11:03, Jan Beulich wrote: >> Along the line with observations in the c

Re: [PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-19 Thread Julien Grall
Hi Jan, Title: I would add 'gnttab:' to clarify which subsystem you are modifying. On 05/02/2024 11:03, Jan Beulich wrote: Along the line with observations in the context of XSA-448, besides "op" no field is relevant when the range to be flushed is empty, much like e.g. the pointers passed to m

[PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-05 Thread Jan Beulich
Along the line with observations in the context of XSA-448, besides "op" no field is relevant when the range to be flushed is empty, much like e.g. the pointers passed to memcpy() are irrelevant (and would never be "validated") when the passed length is zero. Split the existing condition validating