[Devel] [PATCH vz9 v2 10/65] dm-ploop: convert the rest of the lists to use llist variant
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Thu Feb 13 08:32:39 MSK 2025
On 2/12/25 17:33, Konstantin Khorenko wrote:
> @@ -1879,20 +1906,15 @@ 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(&pio->llist, &ploop->llsuspended_pios);
> - queue = false;
> - goto unlock;
> + return;
> }
>
> 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]);
Looks like you've missed this one.
kernel-vz9$ git log -p 3881d6f83b35e99d7ff1089c44d911d702b76aa9... |
grep "(struct[^)]*list[^)]*\*)"
- llist_add((struct llist_node *)(&pio->list),
&ploop->pios[pio->queue_list_id]);
+ llist_add((struct llist_node *)(&pio->list),
&ploop->pios[pio->queue_list_id]);
And it looks like only this one (and it's counterpart in dm-ploop:
combine processing of pios thru prepare list and remove fsync worker).
>
> - if (queue)
> - queue_work(ploop->wq, worker);
> + queue_work(ploop->wq, worker);
> }
>
> void ploop_submit_embedded_pios(struct ploop *ploop, struct list_head *list)
--
Best regards, Tikhomirov Pavel
Senior Software Developer, Virtuozzo.
More information about the Devel
mailing list