A question about tasklet's TASKLET_STATE_RUN state

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

 



Hi,
 
I read from ULK about the value of "TASKLET_STATE_RUN" for tasklet:
==

TASKLET_STATE_RUN

When set, this indicates that the tasklet is being executed; on a uniprocessor system this flag is not used because there is no need to check whether a specific tasklet is running.

In multiprocessor systems, checks the TASKLET_STATE_RUN flag of the tasklet.

==
Each tasklet is defined as a tasklet_struct which is linked into perCPU list "tasklet_vec[NR_CPUS]". 
 
My question is:  One tasklet is “attached” to ONE CPU(since one tasklet is put into ONE perCPU tasklet_struct list). And looks tasklet_action() only handle tasklet_struct list of local CPU. So how could there be a chance for this tasklet to be executed at another CPU? ?
 
    299 struct tasklet_struct

    300 {

    301    struct tasklet_struct *next;

    302    unsigned long state;               // tasklet state sched/run

    303    atomic_t count;                     //lock

    304    void (*func)(unsigned long);

    305    unsigned long data;

    306 };

 

Puzzling,
Simon

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux