From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB638C433E0 for ; Wed, 17 Mar 2021 21:27:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2ADC164F01 for ; Wed, 17 Mar 2021 21:27:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2ADC164F01 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 86D3A6B0070; Wed, 17 Mar 2021 17:26:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 843D26B0071; Wed, 17 Mar 2021 17:26:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6BF036B0072; Wed, 17 Mar 2021 17:26:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0148.hostedemail.com [216.40.44.148]) by kanga.kvack.org (Postfix) with ESMTP id 520436B0070 for ; Wed, 17 Mar 2021 17:26:59 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F243B824999B for ; Wed, 17 Mar 2021 21:26:58 +0000 (UTC) X-FDA: 77930651316.03.EC8B2D8 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf28.hostedemail.com (Postfix) with ESMTP id CA05520032CB for ; Wed, 17 Mar 2021 21:11:11 +0000 (UTC) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 12HL4WFN019290; Wed, 17 Mar 2021 17:11:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=Qn7R1DBn+FXVKxPU1O+Exq3JbNzLw1oLSBeg+fv0Obk=; b=bqGiezT020jDhjQXyIkknb87l6F5bEQphOBTvCLmcSXEX4wDrZ+gHcKq/lCmccVx3P+B +8zLsIJttQc1P57WS89qlNBfIcu9gdFHlBScagOZfbq9q5l6T82ESG3IqwzU6AvMjvND w8YDx4FPsB6raHdbOrBjLMh2whgWDrk8m7ngwog6LHMofEm6Lk9czLUVYfg4JV4OAE1H ZWzyFX/c61btgDUSFNjosLOeA8nojkpenCNE6a9DkAahQvVg/sqt8u3cj2G5ds5EE0rz 0AsITdwI3AswR/k40khtRH7XEGWHYRSGQABqHVSmbwChblS9bFyu7hjvy1+D+/LlvumQ YQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 37bnrmej7q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Mar 2021 17:11:09 -0400 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 12HL5cZs022575; Wed, 17 Mar 2021 17:11:09 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 37bnrmej73-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Mar 2021 17:11:09 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 12HL7Via012753; Wed, 17 Mar 2021 21:11:07 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04ams.nl.ibm.com with ESMTP id 378n18m5bb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Mar 2021 21:11:07 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 12HLB4XG34078982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Mar 2021 21:11:04 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0EE624C04E; Wed, 17 Mar 2021 21:11:04 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 987954C040; Wed, 17 Mar 2021 21:11:03 +0000 (GMT) Received: from osiris (unknown [9.171.26.13]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 17 Mar 2021 21:11:03 +0000 (GMT) Date: Wed, 17 Mar 2021 22:11:02 +0100 From: Heiko Carstens To: Shakeel Butt Cc: Andrew Morton , Roman Gushchin , Johannes Weiner , Hugh Dickins , Juergen Christ , Christian Borntraeger , Vasily Gorbik , Linux MM , Linux-Next Mailing List Subject: Re: [BUG -next] "memcg: charge before adding to swapcache on swapin" broken Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-03-17_11:2021-03-17,2021-03-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 adultscore=0 spamscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103170149 X-Stat-Signature: kq68ndp1a6dshacpxg7tury4biprxb5k X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: CA05520032CB Received-SPF: none (linux.ibm.com>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=mx0b-001b2d01.pphosted.com; client-ip=148.163.158.5 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616015471-854024 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Mar 17, 2021 at 09:44:21PM +0100, Heiko Carstens wrote: > On Wed, Mar 17, 2021 at 08:44:14AM -0700, Shakeel Butt wrote: > > > Config below. And the fun thing is that I cannot reproduce it today > > > anymore with the elfutils test case - what _seems_ to be different is > > > that the test suite runs much faster than yesterday evening. Usually > > > an indication that there is no steal time (other guests which steal > > > cpu time), which again _could_ indicate a race / lack of locking > > > somewhere. > > > This is kind of odd, since yesterday evening it was very reliable to > > > trigger the bug :/ > > > > > > > Thanks for the config. One question regarding swap, is it disk based > > swap or zram? > > Swap device is a real disk. > > > By guests, do you mean there was another significant workload running > > on the machine in parallel to the tests? > > That I don't know. I didn't check. I still can't reproduce with > elfutils anymore, however... > > > If you don't mind can you try swapping01 as well. > > ltp's swapping01 test triggers immediately random processes being > killed with SIGSEGV. I also tested with linux-next 20210316 and _only_ > "memcg: charge before adding to swapcache on swapin" being reverted on > top, and the problem is away - so it looks like the result of > yesterday's bisect is indeed valid. I have to correct myself, actually the system has both: a real disk _and_ zram as swap devices: # swapon -s Filename Type Size Used Priority /dev/dasdb1 partition 21635084 0 -2 /dev/zram0 partition 1014780 0 100 When I disable /dev/zram with "swapoff /dev/zram0" the problem is away as well, even with your patch applied.