summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ed545d3)
Make sure that all non-static functions have a declaration.
Change-Id: Ie1596ad4ba876183862e51508c8bd7fc0451fc5e
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
21 files changed:
* Return the minimum order for which x <= (1UL << order).
* Return -1 if x is 0.
*/
* Return the minimum order for which x <= (1UL << order).
* Return -1 if x is 0.
*/
int cds_lfht_get_count_order_u32(uint32_t x)
{
if (!x)
int cds_lfht_get_count_order_u32(uint32_t x)
{
if (!x)
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
-void rcu_copy_mutex_lock(void)
-{
- int ret;
- ret = pthread_mutex_lock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex lock");
- exit(-1);
- }
-}
-
-void rcu_copy_mutex_unlock(void)
-{
- int ret;
-
- ret = pthread_mutex_unlock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex unlock");
- exit(-1);
- }
-}
-
void *thr_reader(void *data)
{
unsigned long tidx = (unsigned long)data;
void *thr_reader(void *data)
{
unsigned long tidx = (unsigned long)data;
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void *thr_reader(void *data)
{
unsigned long tidx = (unsigned long)data;
void *thr_reader(void *data)
{
unsigned long tidx = (unsigned long)data;
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time;
void *thr_reader(void *arg)
{
caa_cycles_t time1, time2;
void *thr_reader(void *arg)
{
caa_cycles_t time1, time2;
void *thr_writer(void *arg)
{
caa_cycles_t time1, time2;
void *thr_writer(void *arg)
{
caa_cycles_t time1, time2;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
-void rcu_copy_mutex_lock(void)
-{
- int ret;
- ret = pthread_mutex_lock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex lock");
- exit(-1);
- }
-}
-
-void rcu_copy_mutex_unlock(void)
-{
- int ret;
-
- ret = pthread_mutex_unlock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex unlock");
- exit(-1);
- }
-}
-
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time;
void *thr_reader(void *arg)
{
unsigned int i, j;
void *thr_reader(void *arg)
{
unsigned int i, j;
void *thr_writer(void *arg)
{
unsigned int i, j;
void *thr_writer(void *arg)
{
unsigned int i, j;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
-void rcu_copy_mutex_lock(void)
-{
- int ret;
- ret = pthread_mutex_lock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex lock");
- exit(-1);
- }
-}
-
-void rcu_copy_mutex_unlock(void)
-{
- int ret;
-
- ret = pthread_mutex_unlock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex unlock");
- exit(-1);
- }
-}
-
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
void rcu_copy_mutex_lock(void)
{
int ret;
void rcu_copy_mutex_lock(void)
{
int ret;
void rcu_copy_mutex_unlock(void)
{
int ret;
void rcu_copy_mutex_unlock(void)
{
int ret;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
-void rcu_copy_mutex_lock(void)
-{
- int ret;
- ret = pthread_mutex_lock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex lock");
- exit(-1);
- }
-}
-
-void rcu_copy_mutex_unlock(void)
-{
- int ret;
-
- ret = pthread_mutex_unlock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex unlock");
- exit(-1);
- }
-}
-
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
-void rcu_copy_mutex_lock(void)
-{
- int ret;
- ret = pthread_mutex_lock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex lock");
- exit(-1);
- }
-}
-
-void rcu_copy_mutex_unlock(void)
-{
- int ret;
-
- ret = pthread_mutex_unlock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex unlock");
- exit(-1);
- }
-}
-
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
-void rcu_copy_mutex_lock(void)
-{
- int ret;
- ret = pthread_mutex_lock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex lock");
- exit(-1);
- }
-}
-
-void rcu_copy_mutex_unlock(void)
-{
- int ret;
-
- ret = pthread_mutex_unlock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex unlock");
- exit(-1);
- }
-}
-
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
rcu_gc_clear_queue(wtidx);
}
rcu_gc_clear_queue(wtidx);
}
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
static enum test_hash test_choice = TEST_HASH_RW;
static enum test_hash test_choice = TEST_HASH_RW;
void (*get_sigusr1_cb(void))(int)
{
return test_hash_cb[test_choice].sigusr1;
}
void (*get_sigusr1_cb(void))(int)
{
return test_hash_cb[test_choice].sigusr1;
}
void (*get_sigusr2_cb(void))(int)
{
return test_hash_cb[test_choice].sigusr2;
}
void (*get_sigusr2_cb(void))(int)
{
return test_hash_cb[test_choice].sigusr2;
}
void *(*get_thr_reader_cb(void))(void *)
{
return test_hash_cb[test_choice].thr_reader;
}
void *(*get_thr_reader_cb(void))(void *)
{
return test_hash_cb[test_choice].thr_reader;
}
void *(*get_thr_writer_cb(void))(void *)
{
return test_hash_cb[test_choice].thr_writer;
}
void *(*get_thr_writer_cb(void))(void *)
{
return test_hash_cb[test_choice].thr_writer;
}
int (*get_populate_hash_cb(void))(void)
{
return test_hash_cb[test_choice].populate_hash;
int (*get_populate_hash_cb(void))(void)
{
return test_hash_cb[test_choice].populate_hash;
void *thr_count(void *arg)
{
printf_verbose("thread_begin %s, tid %lu\n",
void *thr_count(void *arg)
{
printf_verbose("thread_begin %s, tid %lu\n",
printf("deleted %lu nodes.\n", count);
}
printf("deleted %lu nodes.\n", count);
}
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
static struct cds_lfq_queue_rcu q;
static struct cds_lfq_queue_rcu q;
void *thr_enqueuer(void *_count)
{
unsigned long long *count = _count;
void *thr_enqueuer(void *_count)
{
unsigned long long *count = _count;
void *thr_dequeuer(void *_count)
{
unsigned long long *count = _count;
void *thr_dequeuer(void *_count)
{
unsigned long long *count = _count;
void test_end(struct cds_lfq_queue_rcu *q, unsigned long long *nr_dequeues)
{
struct cds_lfq_node_rcu *snode;
void test_end(struct cds_lfq_queue_rcu *q, unsigned long long *nr_dequeues)
{
struct cds_lfq_node_rcu *snode;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
static struct cds_lfs_stack_rcu s;
static struct cds_lfs_stack_rcu s;
void *thr_enqueuer(void *_count)
{
unsigned long long *count = _count;
void *thr_enqueuer(void *_count)
{
unsigned long long *count = _count;
void *thr_dequeuer(void *_count)
{
unsigned long long *count = _count;
void *thr_dequeuer(void *_count)
{
unsigned long long *count = _count;
void test_end(struct cds_lfs_stack_rcu *s, unsigned long long *nr_dequeues)
{
struct cds_lfs_node_rcu *snode;
void test_end(struct cds_lfs_stack_rcu *s, unsigned long long *nr_dequeues)
{
struct cds_lfs_node_rcu *snode;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
-void rcu_copy_mutex_lock(void)
-{
- int ret;
- ret = pthread_mutex_lock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex lock");
- exit(-1);
- }
-}
-
-void rcu_copy_mutex_unlock(void)
-{
- int ret;
-
- ret = pthread_mutex_unlock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex unlock");
- exit(-1);
- }
-}
-
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void *thr_writer(void *_count)
{
unsigned long long *count = _count;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
static
unsigned long long __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *tot_nr_writes;
static
unsigned long long __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *tot_nr_writes;
-
-void rcu_copy_mutex_lock(void)
-{
- int ret;
- ret = pthread_mutex_lock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex lock");
- exit(-1);
- }
-}
-
-void rcu_copy_mutex_unlock(void)
-{
- int ret;
-
- ret = pthread_mutex_unlock(&rcu_copy_mutex);
- if (ret) {
- perror("Error in pthread mutex unlock");
- exit(-1);
- }
-}
-
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
void *thr_reader(void *_count)
{
unsigned long long *count = _count;
rcu_gc_clear_queue(wtidx);
}
rcu_gc_clear_queue(wtidx);
}
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
void rcu_copy_mutex_lock(void)
{
int ret;
void rcu_copy_mutex_lock(void)
{
int ret;
void rcu_copy_mutex_unlock(void)
{
int ret;
void rcu_copy_mutex_unlock(void)
{
int ret;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time;
void *thr_reader(void *arg)
{
unsigned int i, j;
void *thr_reader(void *arg)
{
unsigned int i, j;
void *thr_writer(void *arg)
{
unsigned int i, j;
void *thr_writer(void *arg)
{
unsigned int i, j;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
void rcu_copy_mutex_lock(void)
{
int ret;
void rcu_copy_mutex_lock(void)
{
int ret;
void rcu_copy_mutex_unlock(void)
{
int ret;
void rcu_copy_mutex_unlock(void)
{
int ret;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time;
void *thr_reader(void *arg)
{
unsigned int i, j;
void *thr_reader(void *arg)
{
unsigned int i, j;
void *thr_writer(void *arg)
{
unsigned int i, j;
void *thr_writer(void *arg)
{
unsigned int i, j;
static struct cds_wfq_queue q;
static struct cds_wfq_queue q;
void *thr_enqueuer(void *_count)
{
unsigned long long *count = _count;
void *thr_enqueuer(void *_count)
{
unsigned long long *count = _count;
void *thr_dequeuer(void *_count)
{
unsigned long long *count = _count;
void *thr_dequeuer(void *_count)
{
unsigned long long *count = _count;
void test_end(struct cds_wfq_queue *q, unsigned long long *nr_dequeues)
{
struct cds_wfq_node *node;
void test_end(struct cds_wfq_queue *q, unsigned long long *nr_dequeues)
{
struct cds_wfq_node *node;
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
void show_usage(int argc, char **argv)
{
printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
* timekeeping -- very crude -- should use MONOTONIC...
*/
* timekeeping -- very crude -- should use MONOTONIC...
*/
long long get_microseconds(void)
{
struct timeval tv;
long long get_microseconds(void)
{
struct timeval tv;
void *rcu_read_perf_test(void *arg)
{
int i;
void *rcu_read_perf_test(void *arg)
{
int i;
void *rcu_update_perf_test(void *arg)
{
long long n_updates_local = 0;
void *rcu_update_perf_test(void *arg)
{
long long n_updates_local = 0;
void perftestinit(void)
{
init_per_thread(n_reads_pt, 0LL);
void perftestinit(void)
{
init_per_thread(n_reads_pt, 0LL);
uatomic_set(&nthreadsrunning, 0);
}
uatomic_set(&nthreadsrunning, 0);
}
int perftestrun(int nthreads, int nreaders, int nupdaters)
{
int t;
int perftestrun(int nthreads, int nreaders, int nupdaters)
{
int t;
int perftest(int nreaders, int cpustride)
{
int i;
int perftest(int nreaders, int cpustride)
{
int i;
return perftestrun(i + 1, nreaders, 1);
}
return perftestrun(i + 1, nreaders, 1);
}
int rperftest(int nreaders, int cpustride)
{
int i;
int rperftest(int nreaders, int cpustride)
{
int i;
return perftestrun(i, nreaders, 0);
}
return perftestrun(i, nreaders, 0);
}
int uperftest(int nupdaters, int cpustride)
{
int i;
int uperftest(int nupdaters, int cpustride)
{
int i;
void *rcu_read_stress_test(void *arg)
{
int i;
void *rcu_read_stress_test(void *arg)
{
int i;
static pthread_mutex_t call_rcu_test_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t call_rcu_test_cond = PTHREAD_COND_INITIALIZER;
static pthread_mutex_t call_rcu_test_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t call_rcu_test_cond = PTHREAD_COND_INITIALIZER;
void rcu_update_stress_test_rcu(struct rcu_head *head)
{
int ret;
void rcu_update_stress_test_rcu(struct rcu_head *head)
{
int ret;
void *rcu_update_stress_test(void *arg)
{
int i;
void *rcu_update_stress_test(void *arg)
{
int i;
void *rcu_fake_update_stress_test(void *arg)
{
if (callrcu_type == CALLRCU_PERTHREAD) {
void *rcu_fake_update_stress_test(void *arg)
{
if (callrcu_type == CALLRCU_PERTHREAD) {
int stresstest(int nreaders)
{
int i;
int stresstest(int nreaders)
{
int i;
void usage(int argc, char *argv[])
{
diag("Usage: %s nreaders [ perf | rperf | uperf | stress ] [ stride ] [ callrcu_global | callrcu_percpu | callrcu_perthread ]\n", argv[0]);
void usage(int argc, char *argv[])
{
diag("Usage: %s nreaders [ perf | rperf | uperf | stress ] [ stride ] [ callrcu_global | callrcu_percpu | callrcu_perthread ]\n", argv[0]);