Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758034AbbBFO7g (ORCPT ); Fri, 6 Feb 2015 09:59:36 -0500 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:58319 "EHLO e23smtp01.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755560AbbBFO7c (ORCPT ); Fri, 6 Feb 2015 09:59:32 -0500 Message-ID: <54D4D713.8020805@linux.vnet.ibm.com> Date: Fri, 06 Feb 2015 20:30:35 +0530 From: Raghavendra K T Organization: IBM User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Linus Torvalds CC: Davidlohr Bueso , Sasha Levin , Waiman Long , Peter Zijlstra , Ingo Molnar , Andrew Morton , Andrey Ryabinin , Dave Jones , LKML Subject: Re: sched: memory corruption on completing completions References: <54D2AA16.6030706@oracle.com> <1423169986.6835.24.camel@stgolabs.net> <54D3DA75.70402@oracle.com> <1423175834.6835.27.camel@stgolabs.net> <54D463B6.2020808@linux.vnet.ibm.com> In-Reply-To: <54D463B6.2020808@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15020614-1618-0000-0000-00000191687E Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1248 Lines: 33 On 02/06/2015 12:18 PM, Raghavendra K T wrote: > On 02/06/2015 04:27 AM, Linus Torvalds wrote: >> On Thu, Feb 5, 2015 at 2:37 PM, Davidlohr Bueso >> wrote: >>>> >>>> It is possible that the paravirt spinlocks could be saved by: >>>> >>>> - moving the clearing of TICKET_SLOWPATH_FLAG into the fastpath >>>> locking code. >>> >>> Ouch, to avoid deadlocks they explicitly need the unlock to occur before >>> the slowpath tail flag is read. >> >> Well, just make the unlock do the actual real unlock operation >> ("fastpath"), leaving the TICKET_SLOWPATH_FLAG alone. The unlock path >> can *test* the flag and do whatever kicking it needs to get people >> started again, but not clear it again. >> > > This is definitely a good idea, will think more on this. > Just sent the patch with that idea, also keeping in mind that head = tail may not hold good for trylock checking (last unlock might have left TICKET_SLOWPATH_FLAG set) http://article.gmane.org/gmane.linux.kernel/1883900 -- 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/