From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752142AbcEKSDu (ORCPT ); Wed, 11 May 2016 14:03:50 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:32990 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751551AbcEKSDt (ORCPT ); Wed, 11 May 2016 14:03:49 -0400 Date: Wed, 11 May 2016 20:03:46 +0200 From: Michal Hocko To: Peter Zijlstra Cc: Tetsuo Handa , LKML , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , "David S. Miller" , Tony Luck , Andrew Morton , Chris Zankel , Max Filippov , Davidlohr Bueso , Waiman Long Subject: Re: [PATCH 03/11] locking, rwsem: introduce basis for down_write_killable Message-ID: <20160511180345.GA27728@dhcp22.suse.cz> References: <20160510115320.GJ23576@dhcp22.suse.cz> <20160510123806.GB3193@twins.programming.kicks-ass.net> <20160511072357.GC16677@dhcp22.suse.cz> <20160511082853.GF16677@dhcp22.suse.cz> <20160511084401.GH3193@twins.programming.kicks-ass.net> <20160511090442.GH16677@dhcp22.suse.cz> <20160511091733.GC3192@twins.programming.kicks-ass.net> <20160511093127.GI16677@dhcp22.suse.cz> <20160511094128.GB3190@twins.programming.kicks-ass.net> <20160511135938.GA19577@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160511135938.GA19577@dhcp22.suse.cz> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 11-05-16 15:59:38, Michal Hocko wrote: > On Wed 11-05-16 11:41:28, Peter Zijlstra wrote: > > On Wed, May 11, 2016 at 11:31:27AM +0200, Michal Hocko wrote: > > > > > Care to cook up a full patch? > > > > compile tested only, if someone could please test it? > > I have tried to run the test case from Tetsuo[1] with a small printk to > show the interrupted writer case: > [ 2753.596678] XXX: Writer interrupted. Woken waiters:0 > [ 2998.266978] XXX: Writer interrupted. Woken waiters:0 > > which means rwsem_atomic_update(-RWSEM_WAITING_BIAS, sem) path which is > the problematic case. oom_reaper was always able to succeed so I guess > the patch works as expected. I will leave the test run for longer to be > sure. And just for the reference I am able to reproduce the lockup without the patch applied and the same test case and a debugging patch [ 1522.036379] XXX interrupted. list_is_singular:1 [ 1523.040462] oom_reaper: unable to reap pid:3736 (tgid=3736) I still cannot say I would understand why the pending RWSEM_WAITING_BIAS matters but I would probably need to look at the code again with a clean head, __rwsem_wake is quite tricky... -- Michal Hocko SUSE Labs