From: hschauhan@nulltrace.org (Himanshu Chauhan)
To: kernelnewbies@lists.kernelnewbies.org
Subject: work_struct not getting scheduled
Date: Thu, 21 Apr 2011 22:12:22 +0530 [thread overview]
Message-ID: <BANLkTim717rJ27Psc-txBHRbK8GLwU1LNA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinXwSup3k2sgazffeVJGWO=7f22Yw@mail.gmail.com>
On Thu, Apr 21, 2011 at 9:29 PM, Dave Hylands <dhylands@gmail.com> wrote:
> Hi Pankaj,
>
> On Thu, Apr 21, 2011 at 5:14 AM, Pankaj B <xpankajbx@gmail.com> wrote:
>> Hi,
>> At my end I was using tasklets to do some handling. But while
>> doing the handling the handler had to sleep, so I had to switch to
>> ?workqueues. I am scheduling a work as follows:
>> INIT_WORK(&event->work, do_handling_work);
>> schedule_work(&event->work);
>> flush_scheduled_work();
>> But the work never gets scheduled. I have put some printks in the
>> do_handling_work() function. Creating workqueue and queueing
>> the work to that workqueue doen't work either. I find this a
>> very strange problem. Does anybody knows about this?
>> FYI: my system has heavy IO load when I schedule the work.
<snip from lwn>
It turned out these functions were used in ~800 places, and in ~90% of
them the return value was ignored! This is perhaps understandble, because
the only way these functions can fail is if their work_struct argument is
uninitialized or already in use. (Whether it's robust for callers to
depend on this behavior remaining unchanged into the indefinite future is
more questionable.)
</snip from lwn>
For more read:
http://lwn.net/Articles/197318/
This might help you.
Regards
Himanshu
prev parent reply other threads:[~2011-04-21 16:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 12:14 work_struct not getting scheduled Pankaj B
2011-04-21 15:32 ` Michael Blizek
2011-04-23 3:46 ` Pankaj B
2011-04-21 15:59 ` Dave Hylands
2011-04-21 16:42 ` Himanshu Chauhan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTim717rJ27Psc-txBHRbK8GLwU1LNA@mail.gmail.com \
--to=hschauhan@nulltrace.org \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).