Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755418AbbFQJGm (ORCPT ); Wed, 17 Jun 2015 05:06:42 -0400 Received: from mail.bmw-carit.de ([62.245.222.98]:34761 "EHLO mail.bmw-carit.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754946AbbFQJFl (ORCPT ); Wed, 17 Jun 2015 05:05:41 -0400 X-CTCH-RefID: str=0001.0A0C0202.5581385D.0459,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Message-ID: <5581385D.9060608@bmw-carit.de> Date: Wed, 17 Jun 2015 11:05:33 +0200 From: Daniel Wagner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Alexei Starovoitov , CC: LKML , Subject: Re: call_rcu from trace_preempt References: <557F509D.2000509@plumgrid.com> <20150615230702.GB3913@linux.vnet.ibm.com> <557F7764.5060707@plumgrid.com> <20150616021458.GE3913@linux.vnet.ibm.com> <557FB7E1.6080004@plumgrid.com> <20150616122733.GG3913@linux.vnet.ibm.com> <558018DD.1080701@monom.org> <55805AC5.8020507@plumgrid.com> <55812BC1.4010604@bmw-carit.de> In-Reply-To: <55812BC1.4010604@bmw-carit.de> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 33 On 06/17/2015 10:11 AM, Daniel Wagner wrote: > On 06/16/2015 07:20 PM, Alexei Starovoitov wrote: >> On 6/16/15 5:38 AM, Daniel Wagner wrote: >>> static int free_thread(void *arg) >>> +{ >>> + unsigned long flags; >>> + struct htab_elem *l; >>> + >>> + while (!kthread_should_stop()) { >>> + spin_lock_irqsave(&elem_freelist_lock, flags); >>> + while (!list_empty(&elem_freelist)) { >>> + l = list_entry(elem_freelist.next, >>> + struct htab_elem, list); >>> + list_del(&l->list); >>> + kfree(l); >> > Anyway, I changed to above kfree() to a kfree_rcu() and it explodes > again. With the same stack trace we seen. Correction. I did this without the is_rcu_watching() change. With that patch applied it works fine again. > Steven's suggestion deferring the work via irq_work results in the same > stack trace. (Now I get cold feets, without the nice heat from the CPU > busy looping...) That one still not working. It also makes the system really really slow. I guess I still do something completely wrong. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/