RTM abort due to RTM_RETIRED.ABORTED_MISC5

RTM abort due to RTM_RETIRED.ABORTED_MISC5

Hi there,

I drop a piece of CPU-bounded code into the Linux Kernel with local interrupt disabled. The code is surrounded by RTM instructions. On average, the code commits successfully within around 100 tries. On abortion, the reason reported by PMU is RTM_RETIRED.ABORTED_MISC5  I wonder what would be the reason provided that the local interrupt has been disabled?

PS. The description of RTM_RETIRED.ABORTED_MISC5: none of the previous 4 categories (e.g. interrupt).

Thanks in advance.

BR,

Le Guan

3 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

The system may have a non-mask able interrupt.

What varies between runs of the protected region?

How much data is protected?

Jim Dempsey

www.quickthreadprogramming.com

Hi Mrs. Jim Dempsey,

Thanks for your reply. In the critical region, the code simply calls the following mass function.

static int mass(int a,int b,int c){
        int i,j,k,t = 2;
        for(i=0;i<0xFFF;++i){
                t+=34;
                t*=34;
                t/=a;
                for(j=0;j<0xFFF;++j){
                        t*=b;
                        t/=c;
                }
                t += (i+a);
        }
        return t;

}

 As you can see, only dozens of bytes on stack is accessed. However, the function spends quite a lot of time, this is the reason why I disabled local interrupt before calling.This function is also deterministic. Moreover, I have checked NMI through /proc/interrupts interface, and there is not much NMIs. The following lists the calling kernel c

//////////////enter atomic///////////////////
        get_cpu();
        local_irq_save(flags);
        result = 0;
        while(1){
                unsigned status;

                ++nretries;
                status = _xbegin();
                if (status == _XBEGIN_STARTED)
                        break;
                P_DEBUG("DEBUG: Transaction aborted %d times with status %d\n",nretries,status);
                if(nretries == 1000)
                        goto out;
        }
        result = mass(0xffff,112312,2432);
out:
        if(_xtest())
                _xend();
        local_irq_restore(flags);
        put_cpu();
//////////////exit atomic///////////////////

        P_DEBUG("result:%d\n",result);

 

Quote:

jimdempseyatthecove wrote:

The system may have a non-mask able interrupt.

What varies between runs of the protected region?

How much data is protected?

Jim Dempsey

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi