Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-06-05 Thread Joe Conway
On 6/4/20 5:20 PM, Alvaro Herrera wrote: > On 2020-May-28, Joe Conway wrote: > >> I backpatched and pushed the changes to the repeat() function. Any other >> opinions regarding backpatch of the unlikely() addition to >> CHECK_FOR_INTERRUPTS()? > > We don't use unlikely() in 9.6 at all, so I woul

Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-06-04 Thread Alvaro Herrera
On 2020-May-28, Joe Conway wrote: > I backpatched and pushed the changes to the repeat() function. Any other > opinions regarding backpatch of the unlikely() addition to > CHECK_FOR_INTERRUPTS()? We don't use unlikely() in 9.6 at all, so I would stop that backpatching at 10 anyhow. (We did back

Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-06-04 Thread Joe Conway
On 5/28/20 1:23 PM, Joe Conway wrote: > On 5/27/20 3:29 AM, Michael Paquier wrote: >>> I think that each of those tests should have a separate unlikely() marker, >>> since the whole point here is that we don't expect either of those tests >>> to yield true in the huge majority of CHECK_FOR_INTERRUP

Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-05-28 Thread Joe Conway
On 5/27/20 3:29 AM, Michael Paquier wrote: >> I think that each of those tests should have a separate unlikely() marker, >> since the whole point here is that we don't expect either of those tests >> to yield true in the huge majority of CHECK_FOR_INTERRUPTS executions. > > +1. I am not sure that

Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-05-27 Thread Michael Paquier
On Mon, May 25, 2020 at 11:14:39AM -0400, Tom Lane wrote: > Perhaps I'm an optimist, but I think that eventually we will figure out > how to make unlikely() work for MSVC. In the meantime we might as well > let it work for gcc-on-Windows builds. I am less optimistic than that, but there is hope.

Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-05-25 Thread Tom Lane
Joe Conway writes: > On 5/25/20 9:52 AM, Tom Lane wrote: >> There was some question as to what (if anything) to do with the Windows >> version of CHECK_FOR_INTERRUPTS. Have you resolved that? > Two questions. > First, as I understand it, unlikely() is a gcc thing, so it does nothing at > all >

Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-05-25 Thread Joe Conway
On 5/25/20 9:52 AM, Tom Lane wrote: > Joe Conway writes: >>> Comments or objections? > >> Seeing none ... I intend to backpatch and push these two patches in the next >> day >> or so. > > There was some question as to what (if anything) to do with the Windows > version of CHECK_FOR_INTERRUPTS.

Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-05-25 Thread Tom Lane
Joe Conway writes: >> Comments or objections? > Seeing none ... I intend to backpatch and push these two patches in the next > day > or so. There was some question as to what (if anything) to do with the Windows version of CHECK_FOR_INTERRUPTS. Have you resolved that?

Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-05-25 Thread Joe Conway
On 5/12/20 8:06 AM, Joe Conway wrote: > I was doing some memory testing under fractional CPU allocations and it became > painfully obvious that the repeat() function needs CHECK_FOR_INTERRUPTS(). > > I exchanged a few emails offlist with Tom about it, and (at the risk of > putting > words in his

repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()

2020-05-12 Thread Joe Conway
I was doing some memory testing under fractional CPU allocations and it became painfully obvious that the repeat() function needs CHECK_FOR_INTERRUPTS(). I exchanged a few emails offlist with Tom about it, and (at the risk of putting words in his mouth) he agreed and felt it was a candidate for ba