Community
cancel
Showing results for 
Search instead for 
Did you mean: 
le_g_1
New Contributor I
76 Views

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

0 Kudos
2 Replies
jimdempseyatthecove
Black Belt
76 Views

The system may have a non-mask able interrupt.

What varies between runs of the protected region?

How much data is protected?

Jim Dempsey

le_g_1
New Contributor I
76 Views

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);

 

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

Reply