improve responsiveness of mars_light thread

This commit is contained in:
Thomas Schoebel-Theuer 2012-02-01 16:17:09 +01:00 committed by Thomas Schoebel-Theuer
parent 7b0f4dbec4
commit 6cdd2415be
1 changed files with 7 additions and 0 deletions

View File

@ -621,6 +621,7 @@ restart:
}
if (found_dir && ++rounds < 10) {
schedule();
goto restart;
}
@ -633,6 +634,8 @@ restart:
struct mars_dent *dent = container_of(tmp, struct mars_dent, dent_link);
#ifdef CONFIG_MARS_USE_SYSLOG
msleep(10); // yield
#else
schedule();
#endif
//MARS_IO("forward prepare '%s'\n", dent->d_path);
status = worker(buf, dent, true, false);
@ -665,6 +668,8 @@ restart:
up_read(&global->dent_mutex);
#ifdef CONFIG_MARS_USE_SYSLOG
msleep(10); // yield
#else
schedule();
#endif
//MARS_IO("forward treat '%s'\n", dent->d_path);
status = worker(buf, dent, false, false);
@ -683,6 +688,8 @@ restart:
up_read(&global->dent_mutex);
#ifdef CONFIG_MARS_USE_SYSLOG
msleep(10); // yield
#else
schedule();
#endif
//MARS_IO("backward treat '%s'\n", dent->d_path);
status = worker(buf, dent, false, true);