Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp903080lqo; Wed, 8 May 2024 20:53:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxXXRrGA+C56OgnqUK/e3H7yxq9tzU7u/rHRPXwBNJEvsjVN8uke54m7C+E4Q0K4wzCsD0Rs2YkVJ+XzzdY8p4BPlhbx5+VmO7tJOmxg== X-Google-Smtp-Source: AGHT+IFOnY7VAo0qnJ5WXvnXkAAZdr57H1SSHuM6uPvQECZZVVTTyL9tLD0hCAuQWYuLyfzErn4G X-Received: by 2002:ac8:7d07:0:b0:437:bae3:abe3 with SMTP id d75a77b69052e-43dbed17a01mr69788221cf.18.1715226796946; Wed, 08 May 2024 20:53:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715226796; cv=pass; d=google.com; s=arc-20160816; b=BYsDgLPbfZTXGHbSCEMs3dJpmEezRK8rQIxgBGbanUlbtr9rISBnt0+rNQsUhk/eb4 90aEC8Tlqy2krgdjKktz4vVNvvDv0GPZKafoVi/eoX6CalVo4wDXAXbySZ/Hb/Sj2kjc NdDzVqx1u+ODCx7mZRtxqiWcSVNPFdf8Rsywe24Y/uWHXy8aH4cnlmOVwiy6TIzGWbjw vmx2/H6a0+PMI5hgTf8nnTOnvEMyt4/2p5fcOuN8B3dtlnrEPiVhnZNCFBPRdZBIrgdK xKlsVKnjjOf9iCiAqLx2z6uQveha6UOmP1AB5nfBoEOowRNAx1n8A5Dik7Cbn2fYYklT v5GA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aCcmKp6zmQN78GXbnv+RsBfflPl7otSTmRS2SgT3gkA=; fh=VX9F+ds1o4+CRBH53LZghD1aexZooiMTsWAL5VXs4Mk=; b=Ryaj+35295dc6FUl3Nd3/mVxtAJ4AjdB/1vx9HywLcxxUw62K1oQKTLA2SxuwI42ht T9BLGMx+Mhl2VLRCaBzM90hB+nTjpNmJ3EYzNqSm7u4D/ym72A+I9mZq94ufxnHtcyl7 w2KE8cHFuCb30xd7i+TxdpXcP8xwf7pdQIUOmJvDLV2cvu4gZ44K4HIQNIMWauSGjqHW GQ58RaWzBt2V9QplB+0Re7uxXhq8zi9i7zvaafF5349hSK8SryoD+Eo8e4t+jACvEs4c 7+aqnyPKPX24isbvswJSNs8lcCmJteEEEHRZNnvstT8Qzz9ZmN/HMme5Qg1ObmMEpSfD SqUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Soah4PO8; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-174110-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174110-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43df549ae71si5252131cf.8.2024.05.08.20.53.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 20:53:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174110-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Soah4PO8; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-174110-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174110-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 92A061C21EE5 for ; Thu, 9 May 2024 03:53:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B9BE1482EB; Thu, 9 May 2024 03:53:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Soah4PO8" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A0B0146D71 for ; Thu, 9 May 2024 03:53:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715226789; cv=none; b=KHX9Vev6dt1JwFxRK5K5rT9L/XZer8OBLGI+lpPEftr5gKsS514DhDKlcfAzC2hcPPj0EtWWkNV6+eJRVmTn6Nz9nQMzYhR2ytM+ydxgXH3Oos/BM7wmjUa7VHOD4hShlUr5WjobB25b3rUQQkrX6BjC09n8CCX9WteGHvmwUvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715226789; c=relaxed/simple; bh=+68GRNHBH1jBWrr/8ph9Kv5X/9L40RQB6vE0mXnN7V0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n1nAp59Yp+d61njdUkyY6s7lXSe9I0nY7cN1Ku8M7pJ5iU1xdZ4P2CjVmgmSny4GuOHvhUea/9kQnrWY3nSgjMoP+Lzm5n7Pd0ADP/xL8u9cc0scdawCcH09VfIG9r/2Q47YWZNv+wLna/vRdkRpOnGqvDFS9cTl7602vtVwDOc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Soah4PO8; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715226785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aCcmKp6zmQN78GXbnv+RsBfflPl7otSTmRS2SgT3gkA=; b=Soah4PO8i390gOpRXL69KObMYETstGC+xmJzrgO2w+RKMwKqNAE+GpeWUaHeuYgxSkGNGv FwWtC4IJjLlGauaws5wfrfh3aOSJvbuIiUWUB6zyQJ16VCE/G1eN286bL8y3EmQLeNena7 lRpyq9NMisba9qb3LswHDwXm11QGrfc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-274-W7pSZSILNT2NU-yL1iRcpg-1; Wed, 08 May 2024 23:53:02 -0400 X-MC-Unique: W7pSZSILNT2NU-yL1iRcpg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 00FEC800053; Thu, 9 May 2024 03:53:02 +0000 (UTC) Received: from localhost (unknown [10.72.116.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A6EBE1005B83; Thu, 9 May 2024 03:52:59 +0000 (UTC) Date: Thu, 9 May 2024 11:52:56 +0800 From: Baoquan He To: Rik van Riel Cc: akpm@linux-foundation.org, Vivek Goyal , Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH] fs/proc: fix softlockup in __read_vmcore Message-ID: References: <20240507091858.36ff767f@imladris.surriel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240507091858.36ff767f@imladris.surriel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Hi, On 05/07/24 at 09:18am, Rik van Riel wrote: > While taking a kernel core dump with makedumpfile on a larger system, > softlockup messages often appear. > > While softlockup warnings can be harmless, they can also interfere > with things like RCU freeing memory, which can be problematic when > the kdump kexec image is configured with as little memory as possible. > > Avoid the softlockup, and give things like work items and RCU a > chance to do their thing during __read_vmcore by adding a cond_resched. Thanks for fixing this. By the way, is it easy to reproduce? And should we add some trace of the softlockup into log so that people can search for it and confirm when encountering it? Thanks Baoquan > --- > fs/proc/vmcore.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c > index 1fb213f379a5..d06607a1f137 100644 > --- a/fs/proc/vmcore.c > +++ b/fs/proc/vmcore.c > @@ -383,6 +383,8 @@ static ssize_t __read_vmcore(struct iov_iter *iter, loff_t *fpos) > /* leave now if filled buffer already */ > if (!iov_iter_count(iter)) > return acc; > + > + cond_resched(); > } > > list_for_each_entry(m, &vmcore_list, list) { > -- > 2.42.0 > > > > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec >