linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maksym Planeta <mplaneta@os.inf.tu-dresden.de>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Moni Shoua <monis@mellanox.com>,
	Doug Ledford <dledford@redhat.com>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 10/10] Replace tasklets with workqueues
Date: Tue, 30 Jul 2019 21:20:23 +0200	[thread overview]
Message-ID: <385139f2-0d31-1148-95c0-a6e6768ab413@os.inf.tu-dresden.de> (raw)
In-Reply-To: <20190725185006.GD7467@ziepe.ca>



On 25/07/2019 20:50, Jason Gunthorpe wrote:
> On Thu, Jul 25, 2019 at 04:36:20PM +0200, Maksym Planeta wrote:
>> Is this one better?
>>
>> Replace tasklets with workqueues in rxe driver. The reason for this
>> replacement is that tasklets are supposed to run atomically, although the
>> actual code may block.
>>
>> Modify the SKB destructor for outgoing SKB's to schedule QP tasks only if
>> the QP is not destroyed itself.
>>
>> Add a variable "pending_skb_down" to ensure that reference counting for a QP
>> is decremented only when QP access related to this skb is over.
>>
>> Separate part of pool element cleanup code to allow this code to be called
>> in the very end of cleanup, even if some of cleanup is scheduled for
>> asynchronous execution. Example, when it was happening is destructor for a
>> QP.
>>
>> Disallow calling of task functions "directly". This allows to simplify logic
>> inside rxe_task.c
>>
>> Schedule rxe_qp_do_cleanup onto high-priority system workqueue, because this
>> function can be scheduled from normal system workqueue.
>>
>> Before destroying a QP, wait until all references to this QP are gone.
>> Previously the problem was that outgoing SKBs could be freed after the QP
>> these SKBs refer to is destroyed.
>>
>> Add blocking rxe_run_task to replace __rxe_do_task that was calling task
>> function directly.
> 
> Mostly but it would also be good to describe the use after free and
> races more specifically
> 

These situations are described in the cover letter (PATCH 00/10). Do you 
need a more detailed description than that?

> Jason
> 

-- 
Regards,
Maksym Planeta

  reply	other threads:[~2019-07-30 19:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 15:14 [PATCH 00/10] Refactor rxe driver to remove multiple race conditions Maksym Planeta
2019-07-22 15:14 ` [PATCH 01/10] Simplify rxe_run_task interface Maksym Planeta
2019-07-22 15:14 ` [PATCH 02/10] Remove counter that does not have a meaning anymore Maksym Planeta
2019-07-22 15:14 ` [PATCH 03/10] Make pool interface more type safe Maksym Planeta
2019-07-22 15:14 ` [PATCH 04/10] Protect kref_put with the lock Maksym Planeta
2019-07-22 15:25   ` Jason Gunthorpe
2019-07-22 15:28     ` Maksym Planeta
2019-07-22 15:14 ` [PATCH 05/10] Fix reference counting for rxe tasklets Maksym Planeta
2019-07-22 15:27   ` Jason Gunthorpe
2019-07-22 15:14 ` [PATCH 06/10] Remove pd form rxe_ah Maksym Planeta
2019-07-22 15:14 ` [PATCH 07/10] Pass the return value of kref_put further Maksym Planeta
2019-07-22 15:29   ` Jason Gunthorpe
2019-07-22 15:31     ` Maksym Planeta
2019-07-22 15:14 ` [PATCH 08/10] Move responsibility of cleaning up pool elements Maksym Planeta
2019-07-22 15:14 ` [PATCH 09/10] Consolidate resetting of QP's tasks into one place Maksym Planeta
2019-07-22 15:14 ` [PATCH 10/10] Replace tasklets with workqueues Maksym Planeta
2019-07-22 15:32   ` Jason Gunthorpe
2019-07-25 14:36     ` Maksym Planeta
2019-07-25 18:50       ` Jason Gunthorpe
2019-07-30 19:20         ` Maksym Planeta [this message]
2019-10-11 10:41           ` Maksym Planeta
2019-10-22 19:04             ` Jason Gunthorpe

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=385139f2-0d31-1148-95c0-a6e6768ab413@os.inf.tu-dresden.de \
    --to=mplaneta@os.inf.tu-dresden.de \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=monis@mellanox.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;
as well as URLs for NNTP newsgroup(s).