From: Michal Hocko <mhocko@suse.cz>
To: Naveen Kumar Parna <pnaveenkos@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Synchronization mechanism between wait_for_completion_interruptible_timeout() & complete()
Date: Thu, 5 Mar 2015 14:23:06 +0100 [thread overview]
Message-ID: <20150305132306.GA19664@dhcp22.suse.cz> (raw)
In-Reply-To: <CAG0bkvJvskLT5JMDwFhzoPNAajKnGauJ41w39E8N9RVc6Hi3mg@mail.gmail.com>
On Wed 04-03-15 18:46:43, Naveen Kumar Parna wrote:
> Hello,
>
> I have a question regarding the synchronization mechanism between
> wait_for_completion_interruptible_timeout() & complete(). I used
> complete() API in the ISR Tx interrupt path and
> wait_for_completion_interruptible_timeout() in struct file_operations
> .write method.
>
> Let assume a scenario in which Tx interrupt occurred and ISR called
> complete() API before any process actually blocked at write method on
> wait_for_completion_interruptible_timeout().
>
> After a few milli seconds, a process called write() API. Does it gets
> blocked on wait_for_completion_interruptible_timeout() for completion
> of a specific task to be signaled from new Tx interrupt?
No, see do_wait_for_common resp. complete and x->done handling.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2015-03-05 13:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 13:16 Naveen Kumar Parna
2015-03-05 13:23 ` Michal Hocko [this message]
2015-03-06 8:34 ` Naveen Kumar Parna
2015-03-06 8:48 ` Michal Hocko
2015-03-09 6:59 ` Naveen Kumar Parna
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=20150305132306.GA19664@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=pnaveenkos@gmail.com \
/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
all inboxes | Powered by JetHome®