[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+sq2Cfoi50d-yo7YXWZ2CX7EEcYfBoY+DpXek9KLQnjE3z5YQ@mail.gmail.com>
Date: Sat, 17 Nov 2018 21:42:41 +0530
From: Sunil Kovvuri <sunil.kovvuri@...il.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: Linux Netdev List <netdev@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>, linux-soc@...r.kernel.org,
Stanislaw Kardach <skardach@...vell.com>,
Sunil Goutham <sgoutham@...vell.com>
Subject: Re: [PATCH v2 04/21] octeontx2-af: Relax resource lock into mutex
On Sat, Nov 17, 2018 at 12:50 PM David Miller <davem@...emloft.net> wrote:
>
> From: sunil.kovvuri@...il.com
> Date: Thu, 15 Nov 2018 16:29:29 +0530
>
> > From: Stanislaw Kardach <skardach@...vell.com>
> >
> > The resource locks does not need to be a spinlock as they are not
> > used in any interrupt handling routines (only in bottom halves).
> > Therefore relax them into a mutex so that later on we may use them
> > in routines that might sleep.
> >
> > Signed-off-by: Stanislaw Kardach <skardach@...vell.com>
> > Signed-off-by: Sunil Goutham <sgoutham@...vell.com>
>
> This is confusing because software interrupts are often called bottom
> halves, and in which sleeping and thus mutexes are not allowed.
Mailbox message interrupt handler schedules workqueue and exits.
Message handling happens in workqueue context, hence moving from
spinlock to mutex.
Hope this clarifies.
Thanks,
Sunil.
Powered by blists - more mailing lists