* [PATCH] make rangeset_report_ranges() report all ranges
@ 2015-07-15 13:06 Jan Beulich
2015-07-15 13:43 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2015-07-15 13:06 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Campbell, Keir Fraser, Ian Jackson, Tim Deegan
[-- Attachment #1: Type: text/plain, Size: 583 bytes --]
find_range() returns NULL when s is below the lowest range, so we have
to use first_range() here (which is as good performance wise).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/common/rangeset.c
+++ b/xen/common/rangeset.c
@@ -289,7 +289,7 @@ int rangeset_report_ranges(
read_lock(&r->lock);
- for ( x = find_range(r, s); x && (x->s <= e) && !rc; x = next_range(r, x) )
+ for ( x = first_range(r); x && (x->s <= e) && !rc; x = next_range(r, x) )
if ( x->e >= s )
rc = cb(max(x->s, s), min(x->e, e), ctxt);
[-- Attachment #2: rangeset-report-fix.patch --]
[-- Type: text/plain, Size: 628 bytes --]
make rangeset_report_ranges() report all ranges
find_range() returns NULL when s is below the lowest range, so we have
to use first_range() here (which is as good performance wise).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/common/rangeset.c
+++ b/xen/common/rangeset.c
@@ -289,7 +289,7 @@ int rangeset_report_ranges(
read_lock(&r->lock);
- for ( x = find_range(r, s); x && (x->s <= e) && !rc; x = next_range(r, x) )
+ for ( x = first_range(r); x && (x->s <= e) && !rc; x = next_range(r, x) )
if ( x->e >= s )
rc = cb(max(x->s, s), min(x->e, e), ctxt);
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] make rangeset_report_ranges() report all ranges
2015-07-15 13:06 [PATCH] make rangeset_report_ranges() report all ranges Jan Beulich
@ 2015-07-15 13:43 ` Ian Campbell
2015-07-15 13:55 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2015-07-15 13:43 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Keir Fraser, Ian Jackson, Tim Deegan
On Wed, 2015-07-15 at 14:06 +0100, Jan Beulich wrote:
> find_range() returns NULL when s is below the lowest range, so we have
> to use first_range() here (which is as good performance wise).
The bug here was that the first range would be omitted under certain
conditions? Saying which here would be interesting.
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> --- a/xen/common/rangeset.c
> +++ b/xen/common/rangeset.c
> @@ -289,7 +289,7 @@ int rangeset_report_ranges(
>
> read_lock(&r->lock);
>
> - for ( x = find_range(r, s); x && (x->s <= e) && !rc; x = next_range(r, x) )
> + for ( x = first_range(r); x && (x->s <= e) && !rc; x = next_range(r, x) )
> if ( x->e >= s )
> rc = cb(max(x->s, s), min(x->e, e), ctxt);
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] make rangeset_report_ranges() report all ranges
2015-07-15 13:43 ` Ian Campbell
@ 2015-07-15 13:55 ` Jan Beulich
0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2015-07-15 13:55 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, Keir Fraser, Ian Jackson, Tim Deegan
>>> On 15.07.15 at 15:43, <ian.campbell@citrix.com> wrote:
> On Wed, 2015-07-15 at 14:06 +0100, Jan Beulich wrote:
>> find_range() returns NULL when s is below the lowest range, so we have
>> to use first_range() here (which is as good performance wise).
>
> The bug here was that the first range would be omitted under certain
> conditions? Saying which here would be interesting.
Not just omitted - the function would have reported nothing at all
in that case. No current user appears to be affected though, but
I have a new user now in the still pending MSI-X patch series that
was harmed.
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-15 13:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-15 13:06 [PATCH] make rangeset_report_ranges() report all ranges Jan Beulich
2015-07-15 13:43 ` Ian Campbell
2015-07-15 13:55 ` Jan Beulich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.