• Tejun Heo's avatar
    workqueue: introduce WORK_OFFQ_CPU_NONE · 715b06b8
    Tejun Heo authored
    Currently, when a work item is off queue, high bits of its data
    encodes the last CPU it was on.  This is scheduled to be changed to
    pool ID, which will make it impossible to use WORK_CPU_NONE to
    indicate no association.
    
    This patch limits the number of bits which are used for off-queue cpu
    number to 31 (so that the max fits in an int) and uses the highest
    possible value - WORK_OFFQ_CPU_NONE - to indicate no association.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Reviewed-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
    715b06b8
workqueue.c 106 KB