struct hammer_flusher flusher;
u_int check_interrupt;
+ u_int check_yield;
uuid_t fsid;
struct hammer_io_list volu_list; /* dirty undo buffers */
struct hammer_io_list undo_list; /* dirty undo buffers */
extern int hammer_verify_zone;
extern int hammer_verify_data;
extern int hammer_write_mode;
+extern int hammer_yield_check;
extern int hammer_autoflush;
extern int64_t hammer_contention_count;
{
hammer_node_ondisk_t node;
hammer_btree_elm_t elm;
+ hammer_mount_t hmp;
int error = 0;
int r;
int s;
/*
* Skip past the current record
*/
+ hmp = cursor->trans->hmp;
node = cursor->node->ondisk;
if (node == NULL)
return(ENOENT);
}
/*
+ * HAMMER can wind up being cpu-bound.
+ */
+ if (++hmp->check_yield > hammer_yield_check) {
+ hmp->check_yield = 0;
+ lwkt_user_yield();
+ }
+
+
+ /*
* Loop until an element is found or we are done.
*/
for (;;) {
* up our scan.
*/
++hammer_stats_btree_iterations;
- hammer_flusher_clean_loose_ios(cursor->trans->hmp);
+ hammer_flusher_clean_loose_ios(hmp);
if (cursor->index == node->count) {
if (hammer_debug_btree) {
while ((ip = next_ip) != NULL) {
next_ip = TAILQ_NEXT(ip, flush_entry);
+ if (++hmp->check_yield > hammer_yield_check) {
+ hmp->check_yield = 0;
+ lwkt_user_yield();
+ }
+
/*
* Add ip to the slave's work array. The slave is
* not currently running.
int hammer_verify_zone;
int hammer_verify_data = 1;
int hammer_write_mode;
+int hammer_yield_check = 16;
int64_t hammer_contention_count;
int64_t hammer_zone_limit;
&hammer_verify_data, 0, "");
SYSCTL_INT(_vfs_hammer, OID_AUTO, write_mode, CTLFLAG_RW,
&hammer_write_mode, 0, "");
+SYSCTL_INT(_vfs_hammer, OID_AUTO, yield_check, CTLFLAG_RW,
+ &hammer_yield_check, 0, "");
KTR_INFO_MASTER(hammer);