[Devel] [RFC PATCH vz9 v6 10/62] dm-ploop: convert the rest of the lists to use llist variant
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Fri Jan 10 11:14:57 MSK 2025
On 12/6/24 05:55, Alexander Atanasov wrote:
> @@ -1871,18 +1901,16 @@ static void ploop_submit_embedded_pio(struct ploop *ploop, struct pio *pio)
> worker = &ploop->fsync_worker;
> }
>
> - spin_lock_irqsave(&ploop->deferred_lock, flags);
> if (unlikely(ploop->stop_submitting_pios)) {
> llist_add((struct llist_node *)(&pio->list), &ploop->llsuspended_pios);
> queue = false;
> - goto unlock;
> + goto out;
Maybe just return here? We only set queue to false in this branch and
one more where we can just return instead, so we can, probably, also
remove queue variable in this patch.
> }
>
> ploop_inc_nr_inflight(ploop, pio);
> - list_add_tail(&pio->list, &ploop->pios[pio->queue_list_id]);
> -unlock:
> - spin_unlock_irqrestore(&ploop->deferred_lock, flags);
> + llist_add((struct llist_node *)(&pio->list), &ploop->pios[pio->queue_list_id]);
>
> +out:
> if (queue)
> queue_work(ploop->wq, worker);
> }
--
Best regards, Tikhomirov Pavel
Senior Software Developer, Virtuozzo.
More information about the Devel
mailing list