lkml.org 
[lkml]   [2020]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: blk-softirq vs smp_call_function_single_async()
On Mon, Jun 08, 2020 at 01:58:00PM +0200, Peter Zijlstra wrote:
> Hi Jens,
>
> I've been going through smp_call_function_single_async() users and
> stumbled upon blk-softirq.c, which has:
>
> static int raise_blk_irq(int cpu, struct request *rq)
> {
> if (cpu_online(cpu)) {
> call_single_data_t *data = &rq->csd;
>
> data->func = trigger_softirq;
> data->info = rq;
> data->flags = 0;
>
> smp_call_function_single_async(cpu, data);
> return 0;
> }
>
> return 1;
> }
>
> What, if anything, guarantees rq->csd is not already in use at that
> time?

A request can only be completed once.

\
 
 \ /
  Last update: 2020-06-08 17:47    [W:0.053 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site