Re: [PATCHSET wq/for-6.9] workqueue: Implement BH workqueue and convert several tasklet users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tejun,
> On Mon, Feb 05, 2024 at 12:50:28PM -0800, Allen wrote:
> > Thank you. I am basing my work on the branch you have
> > pushed.(or-6.9-bh-conversions)
> > https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git/log/?h=for-6.9-bh-conversions
> >
> > In the order of priority, I have started converting drivers/media/*,
> > drivers/dma/* followed by drivers/net/*
> > which constitutes the majority. Putting my plan out here so that the
> > work is not duplicated.
> > I will write back in a day and share the branch for review.
>
> That's great. Thanks.
>
> > W.r.t the conversion, there are drivers which call
> > tasklet_[disable/enable](), which I suppose
> > can be ignored in the case of workqueues, I am not entirely sure if
> > this is the right approach.
> > Please correct me if I am wrong.
>
> I don't think we can ignore them. I was just looking at tasklet_kill() and
> thought we're good because that seemed to map well to cancel_work_sync().
> workqueue doesn't have the counterpart for tasklet_[disable/enable](). I'll
> look through them and think on it.
>

Okay, I will look into it too. I have these rough and completely untested
functions. All I am trying to do is to match what tasklets are currently doing.

static inline void workqueue_disable(struct work_struct *work)
{
     cancel_work_sync(work);
     flush_workqueue(system_bh_wq);
     smp_mb();
}

static inline void workqueue_enable(struct work_struct *work)
{
    smp_mb__before_atomic();
  //  atomic_inc(&work->data);
}

I have to figure out a better way to handle atomic_inc() in the enable
function.

Thanks.

      - Allen




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux