Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759957AbcLATjN (ORCPT ); Thu, 1 Dec 2016 14:39:13 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60113 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756832AbcLATjK (ORCPT ); Thu, 1 Dec 2016 14:39:10 -0500 Date: Thu, 1 Dec 2016 11:39:07 -0800 From: "Paul E. McKenney" To: Boris Zhmurov Cc: Michal Hocko , Paul Menzel , Donald Buczek , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: INFO: rcu_sched detected stalls on CPUs/tasks with `kswapd` and `mem_cgroup_shrink_node` Reply-To: paulmck@linux.vnet.ibm.com References: <20161128105425.GY31360@linux.vnet.ibm.com> <3a4242cb-0198-0a3b-97ae-536fb5ff83ec@kernelpanic.ru> <20161128143435.GC3924@linux.vnet.ibm.com> <20161128150509.GG3924@linux.vnet.ibm.com> <66fd50e1-a922-846a-f427-7654795bd4b5@kernelpanic.ru> <20161130174802.GM18432@dhcp22.suse.cz> <20161130182552.GN18432@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16120119-0008-0000-0000-00000639B337 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006175; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000193; SDB=6.00787966; UDB=6.00381218; IPR=6.00565642; BA=6.00004935; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013506; XFM=3.00000011; UTC=2016-12-01 19:39:07 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16120119-0009-0000-0000-00003D7F4E81 Message-Id: <20161201193907.GR3924@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-12-01_17:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=21 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1612010322 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1580 Lines: 47 On Thu, Dec 01, 2016 at 09:10:01PM +0300, Boris Zhmurov wrote: > Michal Hocko 30/11/16 21:25: > > >>> Do I get it right that s@cond_resched_rcu_qs@cond_resched@ didn't help? > >> > >> I didn't try that. I've tried 4 patches from Paul's linux-rcu tree. > >> I can try another portion of patches, no problem :) > > > > Replacing cond_resched_rcu_qs in shrink_node_memcg by cond_resched would > > be really helpful to tell whether we are missing a real scheduling point > > or whether something more serious is going on here. > > Well, I can confirm, that replacing cond_resched_rcu_qs in > shrink_node_memcg by cond_resched also makes dmesg clean from RCU CPU > stall warnings. > > I've attached patch (just modification of Paul's patch), that fixes RCU > stall messages in situations, when all memory is used by > couchbase/memcached + fs cache and linux starts to use swap. > > > -- > Boris Zhmurov > System/Network Administrator > mailto: bb@kernelpanic.ru > "wget http://kernelpanic.ru/bb_public_key.pgp -O - | gpg --import" > --- a/mm/vmscan.c.orig 2016-11-30 21:52:58.314895320 +0300 > +++ b/mm/vmscan.c 2016-11-30 21:53:29.502895320 +0300 > @@ -2352,6 +2352,7 @@ > nr_reclaimed += shrink_list(lru, nr_to_scan, > lruvec, sc); > } > + cond_resched(); > } > > if (nr_reclaimed < nr_to_reclaim || scan_adjusted) Nice! Just to double-check, could you please also test your patch above with these two commits from -rcu? d2db185bfee8 ("rcu: Remove short-term CPU kicking") f8f127e738e3 ("rcu: Add long-term CPU kicking") Thanx, Paul