From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
Subject: Re: [PATCH] pci: aer: wait till the workqueue completes before free memory
Date: Fri, 15 Jan 2016 19:03:54 +0100 [thread overview]
Message-ID: <20160115180354.GF3781@linutronix.de> (raw)
In-Reply-To: <20160106232758.GE16231@localhost>
* Bjorn Helgaas | 2016-01-06 17:27:58 [-0600]:
>Hi Sebastian,
Hi Bjorn,
>Your change looks reasonable. But I'm curious about the wait_event()
>just below it. That *looks* like it's intended to do the same thing
>as your flush_work().
Indeed.
>Can you explain why the wait_event() isn't working? If we add the
aer_isr() invokes get_e_source() which increments rpc->cons_idx. So
the condition is valid after that and the function does not terminate
yes it invokes aer_isr_one_error().
That means if we have one CPU doing the ISR + workqueue task and another
CPU doing the aer_remove() removal thingy then the latter CPU evaluates
the condition to true and continues cleanup while the former is still in
aer_isr_one_error() wondering where the memory went.
>flush_work(), can we remove the wait_event() stuff?
I think so since its only purpose is to sync against removal which does
not work on SMP. So let me remove this and the wait_release member.
>Bjorn
Sebastian
next prev parent reply other threads:[~2016-01-15 18:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 14:32 [PATCH] pci: aer: wait till the workqueue completes before free memory Sebastian Andrzej Siewior
2016-01-06 23:27 ` Bjorn Helgaas
2016-01-15 18:03 ` Sebastian Andrzej Siewior [this message]
2016-01-15 18:36 ` [PATCH v2] " Sebastian Andrzej Siewior
2016-01-21 20:57 ` Bjorn Helgaas
2016-01-23 20:09 ` Sebastian Andrzej Siewior
2016-01-25 16:22 ` Bjorn Helgaas
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=20160115180354.GF3781@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@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 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).