para_fd_set(STDIN_FILENO, &s->rfds, &s->max_fileno);
}
-#define STDIN_MAX_PENDING (1024 * 1024)
+#define STDIN_MAX_PENDING (100 * 1024)
static void stdin_pre_select_btr(struct sched *s, struct task *t)
{
struct stdin_task *sit = container_of(t, struct stdin_task, task);
- if (btr_no_children(sit->btrn)) {
+ if (btr_no_children(sit->btrn)) { /* TODO: defer node deletion to post select */
t->error = -E_STDIN_NO_CHILD;
btr_del_node(sit->btrn);
sit->btrn = NULL;
t->error = -E_STDIN_EOF;
}
-#define STDIN_INPUT_BUFFER_SIZE 4000
+#define STDIN_INPUT_BUFFER_SIZE (1024 * 32)
static void stdin_post_select_btr(struct sched *s, struct task *t)
{
struct stdin_task *sit = container_of(t, struct stdin_task, task);
buf = para_malloc(STDIN_INPUT_BUFFER_SIZE);
ret = read(STDIN_FILENO, buf, STDIN_INPUT_BUFFER_SIZE);
+ //PARA_CRIT_LOG("read ret: %d\n", ret);
if (ret < 0)
t->error = -ERRNO_TO_PARA_ERROR(errno);
if (ret == 0)