From: Tejun <htejun@gmail.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Andi Kleen <ak@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] add execute_in_process_context() API
Date: Thu, 09 Feb 2006 00:30:05 +0900 [thread overview]
Message-ID: <43EA0E7D.3030302@gmail.com> (raw)
In-Reply-To: <1139411751.3003.1.camel@mulgrave.il.steeleye.com>
James Bottomley wrote:
> On Wed, 2006-02-08 at 09:06 +0100, Andi Kleen wrote:
>
>>In general this seems like a lot of code for a simple problem.
>>It might be simpler to just put the work structure into the parent
>>object and do the workqueue unconditionally
>
>
> We can't do this. For the target release, there may be multiple calls
> to the reap function ... if we embed in the structure we have no room
> for more than one.
>
>
>>>+ if (unlikely(!wqw)) {
>>>+ printk(KERN_ERR "Failed to allocate memory\n");
>>>+ WARN_ON(1);
>>
>>WARN_ON for GFP_ATOMIC failure is bad. It is not really a bug.
>
>
> Here, it means that the requested work wasn't executed. In SCSI that
> would mean an object is now in place permanently. The problem is that
> there's no real way to cope with failure in this case.
>
Hi, James.
I haven't really looked at the code carefully, but I think one work
struct + atomic counter (say pending_reap_cnt) should do it.
queue_work() guarantees the work is run at least once after the call, so
bumping pending_reap_cnt and queueing the work in target reap and
reaping pending_reap_cnt times in the work should work.
--
tejun
next prev parent reply other threads:[~2006-02-08 15:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1139342419.6065.8.camel@mulgrave.il.steeleye.com.suse.lists.linux.kernel>
2006-02-08 8:06 ` [PATCH] add execute_in_process_context() API Andi Kleen
2006-02-08 8:18 ` Andrew Morton
2006-02-08 8:50 ` Andi Kleen
2006-02-08 15:15 ` James Bottomley
2006-02-08 15:18 ` Andi Kleen
2006-02-08 15:57 ` James Bottomley
2006-02-08 16:07 ` Andi Kleen
2006-02-08 15:30 ` Tejun [this message]
2006-02-08 15:36 ` James Bottomley
2006-02-07 20:00 James Bottomley
2006-02-07 20:26 ` Dave Jones
2006-02-07 20:34 ` Andrew Morton
2006-02-08 12:51 ` Stefan Richter
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=43EA0E7D.3030302@gmail.com \
--to=htejun@gmail.com \
--cc=James.Bottomley@SteelEye.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.