Lines Matching refs:cpu
111 unsigned long cpu = (unsigned long) arg; in locking_thread() local
123 seed += cpu; in locking_thread()
131 page_nr += cpu * nr_pages_per_cpu; in locking_thread()
190 page_nr, cpu, area_dst + page_nr * page_size, in locking_thread()
247 unsigned long cpu = (unsigned long) arg; in uffd_poll_thread() local
257 pollfd[1].fd = pipefd[cpu*2]; in uffd_poll_thread()
335 unsigned long cpu = (unsigned long) arg; in background_thread() local
338 for (page_nr = cpu * nr_pages_per_cpu; in background_thread()
339 page_nr < (cpu+1) * nr_pages_per_cpu; in background_thread()
348 unsigned long cpu; in stress() local
355 for (cpu = 0; cpu < nr_cpus; cpu++) { in stress()
356 if (pthread_create(&locking_threads[cpu], &attr, in stress()
357 locking_thread, (void *)cpu)) in stress()
360 if (pthread_create(&uffd_threads[cpu], &attr, in stress()
361 uffd_poll_thread, (void *)cpu)) in stress()
364 if (pthread_create(&uffd_threads[cpu], &attr, in stress()
366 &_userfaults[cpu])) in stress()
370 if (pthread_create(&background_threads[cpu], &attr, in stress()
371 background_thread, (void *)cpu)) in stress()
374 for (cpu = 0; cpu < nr_cpus; cpu++) in stress()
375 if (pthread_join(background_threads[cpu], NULL)) in stress()
392 for (cpu = 0; cpu < nr_cpus; cpu++) { in stress()
395 if (write(pipefd[cpu*2+1], &c, 1) != 1) { in stress()
399 if (pthread_join(uffd_threads[cpu], &_userfaults[cpu])) in stress()
402 if (pthread_cancel(uffd_threads[cpu])) in stress()
404 if (pthread_join(uffd_threads[cpu], NULL)) in stress()
410 for (cpu = 0; cpu < nr_cpus; cpu++) in stress()
411 if (pthread_join(locking_threads[cpu], NULL)) in stress()
424 unsigned long cpu; in userfaultfd_stress() local
483 for (cpu = 0; cpu < nr_cpus; cpu++) { in userfaultfd_stress()
484 if (pipe2(&pipefd[cpu*2], O_CLOEXEC | O_NONBLOCK)) { in userfaultfd_stress()
601 for (cpu = 0; cpu < nr_cpus; cpu++) in userfaultfd_stress()
602 printf(" %lu", userfaults[cpu]); in userfaultfd_stress()