Xen 4.20 release schedule
Hello everyone,
As there were no objections to the proposed release schedule
(https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=NwG3He8eQn39aiaxZCw3bQF7i4YcmjuNw@mail.gmail.com/
), I've updated the wiki with the schedule for Xen 4.20 release
(https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Release_Notes), and it is now accessible from
https://xenbits.xen.org/docs/unstable-staging/support-matrix.html.
Have a good week!
Best regards,
Oleksii
Quoted 8 lines · On 21/10/2024 1:02 pm, [email protected] wrote:
Hello everyone,
As there were no objections to the proposed release schedule
(https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=NwG3He8eQn39aiaxZCw3bQF7i4YcmjuNw@mail.gmail.com/
), I've updated the wiki with the schedule for Xen 4.20 release
(https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Release_Notes), and it is now accessible from
https://xenbits.xen.org/docs/unstable-staging/support-matrix.html.
I have a blocker to raise (against myself...) and no good idea of how to proceed.
The for_each_bit work has a unexpected bug.
for_each_bit ( ... )
{
if ( ... )
break;
}
will fall into an infinite loop. This is caused by for_each_bit() hiding a double for() loop, in order to declare two scope-local variables of different types.
The two variables are one copy of the source expression (really quite important to keep), and one unsigned int iterator (improved optimisation capability by not using a wider-scope variable).
Options are (off the top of my head)
1) Always take the iterator from outer scope
2) Iterator always the same type as the source expression
3) Figure out some way of expressing "once" in the outer loop
Or anything else that I've missed.
~Andrew
Quoted 29 lines · Andrew Cooper
Quoted 8 lines · On 21/10/2024 1:02 pm, [email protected] wrote:
Hello everyone,
As there were no objections to the proposed release schedule
(https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=NwG3He8eQn39aiaxZCw3bQF7i4YcmjuNw@mail.gmail.com/
), I've updated the wiki with the schedule for Xen 4.20 release
(https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Release_Notes), and it is now accessible from
https://xenbits.xen.org/docs/unstable-staging/support-matrix.html.I have a blocker to raise (against myself...) and no good idea of how to proceed.
The
for_each_bitwork has a unexpected bug.
for_each_bit( ... )
{
if ( ... )
break;
}will fall into an infinite loop. This is caused by
for_each_bit()hiding a doublefor()loop, in order to declare two scope-local variables of different types.The two variables are one copy of the source expression (really quite important to keep), and one unsigned int iterator (improved optimisation capability by not using a wider-scope variable).
Quoted 7 lines
Options are (off the top of my head)
1) Always take the iterator from outer scope
2) Iterator always the same type as the source expression
3) Figure out some way of expressing "once" in the outer loopOr anything else that I've missed.
How about requiring the use of another auxiliary construct in place of "break" inside such loop bodies:
#define for_each_bit_break ({ __v = 0; break; })
? Of course the risk remains that people might forget that plain break can't be used there.
If we expected such may want/need using elsewhere as well, introduce
#define BREAK(stmt...) ({ stmt; break; })
and then use that for for_each_bit_break. Albeit the latter may face your opposition as to using a statement as macro argument; you didn't like such in my ASSERT_UNREACHABLE() extension proposal.
Another option, requiring such conditions to come ahead of anything changing state, would be to require use of "continue" in place of "break". That would result in a number of useless loop iterations, though. Plus it would require the exit condition to hold for all subsequent values of "iter", too. IOW not something I'd seriously consider ...
Jan
Quoted 32 lines · Andrew Cooper
Quoted 8 lines · On 21/10/2024 1:02 pm, [email protected] wrote:
Hello everyone,
As there were no objections to the proposed release schedule
(https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=NwG3He8eQn39aiaxZCw3bQF7i4YcmjuNw@mail.gmail.com/
), I've updated the wiki with the schedule for Xen 4.20 release
(https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Release_Notes), and it is now accessible from
https://xenbits.xen.org/docs/unstable-staging/support-matrix.html.I have a blocker to raise (against myself...) and no good idea of how to proceed.
The
for_each_bitwork has a unexpected bug.for_each_bit ( ... ) { if ( ... ) break; }will fall into an infinite loop. This is caused by
for_each_bit()hiding a doublefor()loop, in order to declare two scope-local variables of different types.The two variables are one copy of the source expression (really quite important to keep), and one unsigned int iterator (improved optimisation capability by not using a wider-scope variable).
Options are (off the top of my head)
Quoted 8 lines
1) Always take the iterator from outer scope
2) Iterator always the same type as the source expression
3) Figure out some way of expressing "once" in the outer loopOr anything else that I've missed.
~Andrew
Something like
#define for_each_set_bit(iter, val) \
for ( typeof(val) __v = (val), __c=1; __c; __c=0) \
for ( unsigned int (iter); \
__v && ((iter) = ffs_g(__v) - 1, true); \
__v &= __v - 1 )?
Frediano
Quoted 44 lines · Frediano Ziglio
Quoted 32 lines · Andrew Cooper
Quoted 8 lines · On 21/10/2024 1:02 pm, [email protected] wrote:
Hello everyone,
As there were no objections to the proposed release schedule
(https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=NwG3He8eQn39aiaxZCw3bQF7i4YcmjuNw@mail.gmail.com/
), I've updated the wiki with the schedule for Xen 4.20 release
(https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Release_Notes), and it is now accessible from
https://xenbits.xen.org/docs/unstable-staging/support-matrix.html.I have a blocker to raise (against myself...) and no good idea of how to proceed.
The
for_each_bitwork has a unexpected bug.for_each_bit ( ... ) { if ( ... ) break; }will fall into an infinite loop. This is caused by
for_each_bit()hiding a doublefor()loop, in order to declare two scope-local variables of different types.The two variables are one copy of the source expression (really quite important to keep), and one unsigned int iterator (improved optimisation capability by not using a wider-scope variable).
Options are (off the top of my head)
Quoted 8 lines
1) Always take the iterator from outer scope
2) Iterator always the same type as the source expression
3) Figure out some way of expressing "once" in the outer loopOr anything else that I've missed.
~Andrew
Something like
Quoted 7 lines
#define for_each_set_bit(iter, val) \ for ( typeof(val) __v = (val), __c=1; __c; __c=0) \ for ( unsigned int (iter); \ __v && ((iter) = ffs_g(__v) - 1, true); \ __v &= __v - 1 )?
Hmm, right, but then we don't even need a 2nd variable, do we?
#define for_each_set_bit(iter, val) \
for ( typeof(val) __v = (val); __v; __v = 0 ) \
for ( unsigned int (iter); \
__v && ((iter) = ffs_g(__v) - 1, true); \
__v &= __v - 1 )Jan
Quoted 56 lines · Jan Beulich
Quoted 44 lines · Frediano Ziglio
Quoted 32 lines · Andrew Cooper
Quoted 8 lines · On 21/10/2024 1:02 pm, [email protected] wrote:
Hello everyone,
As there were no objections to the proposed release schedule
(https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=NwG3He8eQn39aiaxZCw3bQF7i4YcmjuNw@mail.gmail.com/
), I've updated the wiki with the schedule for Xen 4.20 release
(https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Release_Notes), and it is now accessible from
https://xenbits.xen.org/docs/unstable-staging/support-matrix.html.I have a blocker to raise (against myself...) and no good idea of how to proceed.
The
for_each_bitwork has a unexpected bug.for_each_bit ( ... ) { if ( ... ) break; }will fall into an infinite loop. This is caused by
for_each_bit()hiding a doublefor()loop, in order to declare two scope-local variables of different types.The two variables are one copy of the source expression (really quite important to keep), and one unsigned int iterator (improved optimisation capability by not using a wider-scope variable).
Options are (off the top of my head)
Quoted 8 lines
1) Always take the iterator from outer scope
2) Iterator always the same type as the source expression
3) Figure out some way of expressing "once" in the outer loopOr anything else that I've missed.
~Andrew
Something like
Quoted 7 lines
#define for_each_set_bit(iter, val) \ for ( typeof(val) __v = (val), __c=1; __c; __c=0) \ for ( unsigned int (iter); \ __v && ((iter) = ffs_g(__v) - 1, true); \ __v &= __v - 1 )?
Hmm, right, but then we don't even need a 2nd variable, do we?
Quoted 7 lines
#define for_each_set_bit(iter, val) \ for ( typeof(val) __v = (val); __v; __v = 0 ) \ for ( unsigned int (iter); \ __v && ((iter) = ffs_g(__v) - 1, true); \ __v &= __v - 1 )Jan
In theory it should work too, not sure if the variable aliasing would compromise the assembly output. We depend on the compiler doing some optimizations.
Frediano
Quoted 43 lines · Frediano Ziglio
Quoted 42 lines · Jan Beulich
Quoted 41 lines · Frediano Ziglio
Quoted 30 lines · Andrew Cooper
Quoted 8 lines · On 21/10/2024 1:02 pm, [email protected] wrote:
Hello everyone,
As there were no objections to the proposed release schedule
(https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=NwG3He8eQn39aiaxZCw3bQF7i4YcmjuNw@mail.gmail.com/
), I've updated the wiki with the schedule for Xen 4.20 release
(https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Release_Notes), and it is now accessible from
https://xenbits.xen.org/docs/unstable-staging/support-matrix.html.I have a blocker to raise (against myself...) and no good idea of how to proceed.
The
for_each_bitwork has a unexpected bug.for_each_bit ( ... ) { if ( ... ) break; }will fall into an infinite loop. This is caused by
for_each_bit()hiding a doublefor()loop, in order to declare two scope-local variables of different types.The two variables are one copy of the source expression (really quite important to keep), and one unsigned int iterator (improved optimisation capability by not using a wider-scope variable).
Options are (off the top of my head)
Quoted 8 lines
1) Always take the iterator from outer scope
2) Iterator always the same type as the source expression
3) Figure out some way of expressing "once" in the outer loopOr anything else that I've missed.
~Andrew
Something like
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
#define for_each_set_bit(iter, val) \ for ( typeof(val) __v = (val), __c=1; __c; __c=0) \ for ( unsigned int (iter); \ __v && ((iter) = ffs_g(__v) - 1, true); \ __v &= __v - 1 )?
Yes, that was the option 3 I was thinking about, although I'd not got as far as doing the thinking bit yet.
Quoted 7 lines
Quoted 7 lines
Hmm, right, but then we don't even need a 2nd variable, do we?
#define for_each_set_bit(iter, val) \ for ( typeof(val) __v = (val); __v; __v = 0 ) \ for ( unsigned int (iter); \ __v && ((iter) = ffs_g(__v) - 1, true); \ __v &= __v - 1 )
This does look like a better option.
Quoted 5 lines
Quoted 2 lines
Jan
In theory it should work too, not sure if the variable aliasing would compromise the assembly output. We depend on the compiler doing some optimizations.
We already depend on some optimisation to get rid of the double loop (both -O2 and -O1 cope).
I'll double check the result here too.
~Andrew