RE: 2.4.31 TLB corruption

From: Smarduch Mario-CMS063 <CMS063_at_motorola.com>
Date: 2005-06-23 06:37:48
Attached is a patch produced by HP LOSL its not quite against
2.4.31  but I it probably should apply cleanly, the related code
is indentical to latest 2.4 kernel. If needed I could inquire
for them to develop a 2.6 patch (I myself don't have 2.6 kernel up)
please ask if needed. 

To reproduce the RID range was shrunk to lim/maxctx=1023/2048.
on an 8-way about 180 copies with an argument of 5 was ran.
We'd also appreciate feedback on the patch itself. There is stil
another scenario on NUMA systems I'm concerned about I'll ask
on the maillist when time permits.

- mario
-------------------------------------

#include <stdio.h>
#include <errno.h>
#include <pthread.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>

volatile unsigned long udummy1, udummy2, udummy3;
volatile unsigned long idummy1=100, idummy2=200, idummy3=300;

void * worker(void *self) {
  int x = -1;
  FILE *pp = 0;
  long junk[8192];
  char buf[1024];

    x = -1;
    errno = 0;
    //printf("Thread: %u\n", getpid());
    pp = popen("ls", "r");
    x = errno;
    if(pp) {
      memset(buf, 0, sizeof(buf));
      while(fgets(buf, sizeof(buf)-1, pp) != 0) {
        ;
        }
      pclose(pp);
    udummy1=101;
    udummy2=102;
    udummy3=103;
    idummy1++;
    idummy2++;
    idummy3++;
usleep(5000);

    }
    else printf("popen failed: %s\n", strerror(errno));
    //printf("Thread Exit: %ud\n", getpid());
    pthread_exit(NULL);
}

int main(int argc, char **argv) {
  pthread_t pt[512];
  pthread_t pthr;
  int x = 0;
  int thrcnt=5;

  if(argc > 1)
    thrcnt=atoi(argv[1]);
  if(!thrcnt)
        thrcnt=5;

  while(1) {
        //printf("Creating Thread...");
        for (x = 0; x < thrcnt; x++)
                pthread_create(&(pt[x]), 0, worker, (void *)&x);
        for (x = 0; x < thrcnt; x++)
                pthread_join( pt[x], NULL);
        usleep(5000);
        }
  return 0;
}




-----Original Message-----
From: David Mosberger [mailto:davidm@napali.hpl.hp.com] 
Sent: Wednesday, June 22, 2005 12:56 PM
To: Smarduch Mario-CMS063
Cc: davidm@hpl.hp.com; linux-ia64@vger.kernel.org
Subject: RE: 2.4.31 TLB corruption


>>>>> On Tue, 21 Jun 2005 16:22:50 -0500, Smarduch Mario-CMS063 
>>>>> <CMS063@motorola.com> said:

  Mario> FYI, shrinking the RID range does reproduce the problem
  Mario> easily. Its also reproducable on 2.6.7.

That's progress.  Could you provide the kernel patch and description of minimal test-case to reproduce the problem?

Thanks,

	--david


-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Wed Jun 22 16:45:56 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:39 EST