Linus Torvalds <[email protected]> wrote: > How about something like this? At first glance, this looks reasonable. It also looks like it should be used to replace a lot of the cancel_delayed_work() calls that attempt to cancel _undelayed_ work items. That would allow a number of work items to be downgraded from delayed_work to work_struct. Also, the name "run_scheduled_work" sort of suggests that the work *will* be run regardless of whether it was pending or not. Given the confusion over cancel_delayed_work(), I imagine this will rain confusion too. + if (get_wq_data(work) == cwq + && test_bit(WORK_STRUCT_PENDING, &work->management) I wonder if those can be combined, perhaps: + if ((work->management & ~WORK_STRUCT_NOAUTOREL) == + ((unsigned long) cwq | (1 << WORK_STRUCT_PENDING)) Otherwise for i386 the compiler can't combine them because test_bit() is done with inline asm. And: + if (!test_bit(WORK_STRUCT_PENDING, &work->management)) Should possibly be: + if (!work_pending(work)) David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] Export current_is_keventd() for libphy
- From: David Howells <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Jeff Garzik <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- References:
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Linus Torvalds <[email protected]>
- [PATCH] Export current_is_keventd() for libphy
- From: Ben Collins <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: "Maciej W. Rozycki" <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andy Fleming <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Roland Dreier <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: "Maciej W. Rozycki" <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- Prev by Date: Re: [PATCH 26/35] Unionfs: Privileged operations workqueue
- Next by Date: Re: PMTMR running too fast
- Previous by thread: Re: [PATCH] Export current_is_keventd() for libphy
- Next by thread: Re: [PATCH] Export current_is_keventd() for libphy
- Index(es):