[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4A5424E8.1070201@gmail.com>
Date: Wed, 08 Jul 2009 07:47:36 +0300
From: Artem Bityutskiy <dedekind1@...il.com>
To: "Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>
CC: Jens Axboe <jens.axboe@...cle.com>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, chris.mason@...cle.com,
david@...morbit.com, hch@...radead.org, akpm@...ux-foundation.org,
jack@...e.cz, richard@....demon.co.uk, damien.wyart@...e.fr,
fweisbec@...il.com, Alan.Brunelle@...com
Subject: Re: [PATCH 02/10] writeback: switch to per-bdi threads for flushing
data
Zhang, Yanmin wrote:
>>> + list_for_each_entry_safe(bdi, tmp, &bdi_list, bdi_list) {
>>> + if (bdi->task || !bdi_has_dirty_io(bdi))
>>> + continue;
>>> +
>>> + bdi_add_default_flusher_task(bdi);
>>> + }
>>> +
>>> + set_current_state(TASK_INTERRUPTIBLE);
>>> +
>> What happens if we are preempted here? Since we have TASK_INTERRUPTIBLE
>> state, we will not come back unless some other task wakes us up. Who
>> would wake us up in this case?
> If it's preempted (CONFIG_PREEMPT=y), it will stay in runqueue. Only when
> it calls schedule initiatively or calls schedule when exiting to user space,
> it will be moved out of runqueue if its state isn't TASK_RUNNING.
>
> See flag PREEMPT_ACTIVE.
OK, thanks for the hint!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists