diff options
Diffstat (limited to 'litmus/color_queue.c')
-rw-r--r-- | litmus/color_queue.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/litmus/color_queue.c b/litmus/color_queue.c index 6543811fd06..a1030f5dc19 100644 --- a/litmus/color_queue.c +++ b/litmus/color_queue.c | |||
@@ -99,6 +99,8 @@ static void color_page_info_add_work(struct color_page_info *info, void *vaddr_s | |||
99 | { | 99 | { |
100 | int i; | 100 | int i; |
101 | 101 | ||
102 | TRACE_CUR("adding work for color_page_info: 0x%p\n", info); | ||
103 | |||
102 | for (i = 0; i < COLOR_REQUESTS_PER_PAGE; i++) { | 104 | for (i = 0; i < COLOR_REQUESTS_PER_PAGE; i++) { |
103 | struct color_queue_request *req = &info->requests[i]; | 105 | struct color_queue_request *req = &info->requests[i]; |
104 | void *work_vaddr = vaddr_start + i * COLOR_QUEUE_REQ_SIZE; | 106 | void *work_vaddr = vaddr_start + i * COLOR_QUEUE_REQ_SIZE; |
@@ -125,6 +127,10 @@ void color_queue_enqueue_read(struct task_struct *ts) | |||
125 | { | 127 | { |
126 | struct color_page_info *cur_info; | 128 | struct color_page_info *cur_info; |
127 | 129 | ||
130 | TRACE_CUR("enqueue read prev: %p next: %p\n", | ||
131 | tsk_rt(ts)->color_page_info_list.prev, | ||
132 | tsk_rt(ts)->color_page_info_list.next); | ||
133 | |||
128 | list_for_each_entry(cur_info, | 134 | list_for_each_entry(cur_info, |
129 | &tsk_rt(ts)->color_page_info_list, | 135 | &tsk_rt(ts)->color_page_info_list, |
130 | list) | 136 | list) |
@@ -218,7 +224,9 @@ static void wait_next_phase(void) | |||
218 | * set up the lockdown value and updated the queue phase. | 224 | * set up the lockdown value and updated the queue phase. |
219 | */ | 225 | */ |
220 | entry->phase = color_queue.phase; | 226 | entry->phase = color_queue.phase; |
221 | QTRACE(color_queue, "moving on to next phase\n"); | 227 | QTRACE(color_queue, |
228 | "cpu->phase: %d advances to a higher phase\n", | ||
229 | entry->phase); | ||
222 | raw_spin_unlock(&color_queue.lock); | 230 | raw_spin_unlock(&color_queue.lock); |
223 | return; | 231 | return; |
224 | } | 232 | } |
@@ -243,9 +251,10 @@ static void wait_next_phase(void) | |||
243 | color_queue.way = next_way; | 251 | color_queue.way = next_way; |
244 | color_queue.at_barrier = 0; | 252 | color_queue.at_barrier = 0; |
245 | color_queue.phase++; | 253 | color_queue.phase++; |
246 | QTRACE(color_queue, "moving on to start on the next way\n"); | 254 | QTRACE(color_queue, "bumped the phase and way\n"); |
247 | raw_spin_unlock(&color_queue.lock); | 255 | raw_spin_unlock(&color_queue.lock); |
248 | return; | 256 | } if (color_queue.nr_cpus < color_queue.at_barrier) { |
257 | BUG(); | ||
249 | } else { | 258 | } else { |
250 | /* Wait for work from the last phase to complete. */ | 259 | /* Wait for work from the last phase to complete. */ |
251 | QTRACE(color_queue, "still waiting for others\n"); | 260 | QTRACE(color_queue, "still waiting for others\n"); |