Lines Matching refs:bpage
365 static void rb_init_page(struct buffer_data_page *bpage)
367 local_set(&bpage->commit, 0);
386 static void free_buffer_page(struct buffer_page *bpage)
388 free_page((unsigned long)bpage->page);
389 kfree(bpage);
769 struct buffer_page **bpage)
771 struct list_head *p = rb_list_head((*bpage)->list.next);
773 *bpage = list_entry(p, struct buffer_page, list);
902 struct buffer_page *bpage)
904 unsigned long val = (unsigned long)bpage;
935 struct buffer_page *bpage, *tmp;
947 list_for_each_entry_safe(bpage, tmp, head, list) {
949 bpage->list.next->prev != &bpage->list))
952 bpage->list.prev->next != &bpage->list))
954 if (rb_check_list(cpu_buffer, &bpage->list))
966 struct buffer_page *bpage, *tmp;
974 bpage = kzalloc_node(ALIGN(sizeof(*bpage), cache_line_size()),
976 if (!bpage)
979 rb_check_bpage(cpu_buffer, bpage);
981 list_add(&bpage->list, &pages);
986 bpage->page = (void *)addr;
987 rb_init_page(bpage->page);
1003 list_for_each_entry_safe(bpage, tmp, &pages, list) {
1004 list_del_init(&bpage->list);
1005 free_buffer_page(bpage);
1014 struct buffer_page *bpage;
1029 bpage = kzalloc_node(ALIGN(sizeof(*bpage), cache_line_size()),
1031 if (!bpage)
1034 rb_check_bpage(cpu_buffer, bpage);
1036 cpu_buffer->reader_page = bpage;
1040 bpage->page = (void *)addr;
1041 rb_init_page(bpage->page);
1068 struct buffer_page *bpage, *tmp;
1075 list_for_each_entry_safe(bpage, tmp, head, list) {
1076 list_del_init(&bpage->list);
1077 free_buffer_page(bpage);
1079 bpage = list_entry(head, struct buffer_page, list);
1080 free_buffer_page(bpage);
1218 struct buffer_page *bpage;
1229 bpage = list_entry(p, struct buffer_page, list);
1230 list_del_init(&bpage->list);
1231 free_buffer_page(bpage);
1247 struct buffer_page *bpage;
1258 bpage = list_entry(p, struct buffer_page, list);
1259 list_del_init(&bpage->list);
1260 list_add_tail(&bpage->list, cpu_buffer->pages);
1282 struct buffer_page *bpage, *tmp;
1345 bpage = kzalloc_node(ALIGN(sizeof(*bpage),
1348 if (!bpage)
1350 list_add(&bpage->list, &pages);
1354 bpage->page = (void *)addr;
1355 rb_init_page(bpage->page);
1377 list_for_each_entry_safe(bpage, tmp, &pages, list) {
1378 list_del_init(&bpage->list);
1379 free_buffer_page(bpage);
1399 __rb_data_page_index(struct buffer_data_page *bpage, unsigned index)
1401 return bpage->data + index;
1404 static inline void *__rb_page_index(struct buffer_page *bpage, unsigned index)
1406 return bpage->page->data + index;
1422 static inline unsigned long rb_page_write(struct buffer_page *bpage)
1424 return local_read(&bpage->write) & RB_WRITE_MASK;
1427 static inline unsigned rb_page_commit(struct buffer_page *bpage)
1429 return local_read(&bpage->page->commit);
1432 static inline unsigned long rb_page_entries(struct buffer_page *bpage)
1434 return local_read(&bpage->entries) & RB_WRITE_MASK;
1438 static inline unsigned rb_page_size(struct buffer_page *bpage)
1440 return rb_page_commit(bpage);
1975 struct buffer_page *bpage;
1984 bpage = cpu_buffer->tail_page;
1986 if (bpage->page == (void *)addr && rb_page_write(bpage) == old_index) {
1988 local_read(&bpage->write) & ~RB_WRITE_MASK;
1997 index = local_cmpxchg(&bpage->write, old_index, new_index);
2375 struct buffer_page *bpage = cpu_buffer->commit_page;
2381 if (likely(bpage->page == (void *)addr)) {
2382 local_dec(&bpage->entries);
2390 rb_inc_page(cpu_buffer, &bpage);
2391 start = bpage;
2393 if (bpage->page == (void *)addr) {
2394 local_dec(&bpage->entries);
2397 rb_inc_page(cpu_buffer, &bpage);
2398 } while (bpage != start);
3697 struct buffer_data_page *bpage;
3704 bpage = (void *)addr;
3706 rb_init_page(bpage);
3708 return bpage;
3763 struct buffer_data_page *bpage;
3787 bpage = *data_page;
3788 if (!bpage)
3835 memcpy(bpage->data + pos, rpage->data + rpos, size);
3850 /* update bpage */
3851 local_set(&bpage->commit, pos);
3852 bpage->time_stamp = save_timestamp;
3861 rb_init_page(bpage);
3862 bpage = reader->page;
3867 *data_page = bpage;
3875 local_set(&bpage->commit, reader->real_end);
3881 commit = local_read(&bpage->commit);
3890 memcpy(&bpage->data[commit], &missed_events,
3892 local_add(RB_MISSED_STORED, &bpage->commit);
3895 local_add(RB_MISSED_EVENTS, &bpage->commit);
3902 memset(&bpage->data[commit], 0, BUF_PAGE_SIZE - commit);