From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Shi, Yang" Subject: Re: [PATCH] bpf: convert hashtab lock to raw lock Date: Mon, 02 Nov 2015 09:31:50 -0800 Message-ID: <56379E06.3040008@linaro.org> References: <1446243386-26582-1-git-send-email-yang.shi@linaro.org> <20151031000356.GA28070@Alexeis-MacBook-Pro.local> <20151031094736.494427d7@grimm.local.home> <56350A86.5090500@iogearbox.net> <5637997D.1020502@linaro.org> <20151102122405.56dd97a1@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Borkmann , Alexei Starovoitov , ast@kernel.org, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, netdev@vger.kernel.org, linaro-kernel@lists.linaro.org To: Steven Rostedt Return-path: In-Reply-To: <20151102122405.56dd97a1@gandalf.local.home> Sender: netdev-owner@vger.kernel.org List-Id: linux-rt-users.vger.kernel.org On 11/2/2015 9:24 AM, Steven Rostedt wrote: > On Mon, 02 Nov 2015 09:12:29 -0800 > "Shi, Yang" wrote: > >> Yes, it is common practice for converting sleepable spin lock to raw >> spin lock in -rt to avoid scheduling in atomic context bug. > > Note, in a lot of cases we don't just convert spin_locks to raw because > of atomic context. There's times we need to change the design where the > lock is not taken in atomic context (switching preempt_disable() to a > local_lock() for example). Yes, definitely. Understood. Thanks, Yang > > But bpf is much like ftrace and kprobes where they can be taken almost > anywhere, and the do indeed need to be raw. > > -- Steve >