Re: Ticketing spinlocks - How to get to the owner who locked the spinlock?

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

 



Hello Manty,

On Tue, Jan 27, 2015 at 11:27 AM, manty kuma <mantykuma@xxxxxxxxx> wrote:
>
> Hi All,
>
> Currently I am looking into an issue which is holding the printk lock(logbuf_lock)
>
> logbuf_lock = {
>   raw_lock = {
>     owner = 0,
>     next = 4
>   }
> }
>
> I read about ticketing spinlocks to understand the above output. I understood that 4 cpu's are waiting for the lock while someone already has it.
>
> I would like to know who has it? Is there a way I can know which process is acquiring a given spinlock? Is the information not stored in it?
>
> I am using crash tool to analyse the dump


crash> raw_spinlock_t
typedef struct raw_spinlock {
    arch_spinlock_t raw_lock;
    unsigned int magic;
    unsigned int owner_cpu;
    void *owner;
} raw_spinlock_t;
SIZE: 16

The owner field points to task holding the lock, if locked.

Here is what i have in one of my dumps,
crash> logbuf_lock
logbuf_lock = $6 = {
  raw_lock = {
    {
      slock = 464001960,
      tickets = {
        owner = 7080,
        next = 7080
      }
    }
  },
  magic = 3735899821,
  owner_cpu = 4294967295,
  owner = 0xffffffff
}

since lock is not acquired, it shows 0xFFFFFFFF.
Otherwise point to a task_struct *.

thanks,
Arun

>
>
> Regards,
> Manty
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[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