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 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

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

 

Zitat:

jimdempseyatthecove schrieb:

The system may have a non-mask able interrupt.

What varies between runs of the protected region?

How much data is protected?

Jim Dempsey

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui