Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp866106ybi; Fri, 31 May 2019 10:00:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcbzV8YMXR1A6SqCuoNxOd/ciGlmqbHJn1VWdF1TzI+e5wH0iN5N6TbQPfvLinhYA4sl76 X-Received: by 2002:a17:90a:8982:: with SMTP id v2mr10324869pjn.138.1559322049985; Fri, 31 May 2019 10:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559322049; cv=none; d=google.com; s=arc-20160816; b=EwyhQRtM7wEgGVryNkvNYV4d4jUHJ7+aldbafsNBYEpJeeGx8e9qsqP4Dec5xc4joO wqZsixN9dM3byeMIcv8iUhryy94RTdj8AILPCSH/tSPxxfcL2uUzDTqXpCpyWv1cwKR2 9Ya9WadZAsaT+CpggsSo+EOFW+HTJDiOsXWAxWNoLd7vBg1Vs13gGtvGAVQHiigQ+i8u fIGymwLT9uzfkvCpqounWH5p2XDr1tELewQ90Uq/8FbQU5KnPPLxk3XIyZ8x76CB32XR ifLe2qQ0j7f/UEFCNQWoCcluv9ecTk8t/tUjcEVK0DGx1eiVyt0D+DGAIDaugTj+zcTS yYRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=G82jjtVPtIBiymxHtt3594fMUhRhOyCXS9qt0zROSRs=; b=uee/ocahL7q50x0oev6Lvww/O1FP29NBMAPry61+EgVkV8lfLFFUdF5grpKQkJILng DmcKkSEAVSdV12iLQF6wrNdyu6O6uCgdxQnize6asGqZ2fy1Gt4Lt+jMOX9RxYUDTIUB bYFhB1m6Me+z48qAVq+Cq2eDPzDQ5lcjelEZIdQnw1Aaj/t/d+nhgdZ1Kbnr4Zw1ajT/ UfeYengQjxRiSYflD8tHYZuaDjwQSmX56RVDR8j35BNaxvMgB1DNEkDxHwQpPBYNKRq2 ELqR4n1XHpnx2VDXYierzaQGEfjYiWS1UwHruZjz0rDdcIh3qO27AKivxOfUtZw+Kv26 cgQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=vaNEY3xb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k17si7509908pfi.230.2019.05.31.10.00.32; Fri, 31 May 2019 10:00:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=vaNEY3xb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726700AbfEaQ7Z (ORCPT + 99 others); Fri, 31 May 2019 12:59:25 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:47260 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbfEaQ7Y (ORCPT ); Fri, 31 May 2019 12:59:24 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4VGmkRa037317; Fri, 31 May 2019 16:59:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=G82jjtVPtIBiymxHtt3594fMUhRhOyCXS9qt0zROSRs=; b=vaNEY3xbHbsmFj4uuy58MnSzoYNnmBWMZ1uHLJz4TFgQS3PDxWUY7uo0/yb+5cHLLCQI GPx/XnsFEsPnQn9U1wJYM1XDXZtZkBSA5i9qKO+NWK5gGJBFA5LeeSsgb1/2jPXiKqU0 Ifu/u2p8g04sYFmK5eV0CPPxOFSlT7KCzWSvdKifcZ/8RR8VLBpEs73OSYPVr4kfC81D EveRMMmF5HRn9+TFQXc35gdIgha+aTQqi2X0T3LXHfMzmagOchgedP58kzYQlVlkeBk/ tsbLdCCdJQ0krqpBY9ZVH3eytgUQRnKCKvtp05KQHOSWorDRSYve3FvE//mlmiRGkTEc Ig== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2spw4tyn5e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 May 2019 16:59:05 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4VGvdh1084819; Fri, 31 May 2019 16:59:05 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2ss1fprjt9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 May 2019 16:59:05 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x4VGx2Fc009144; Fri, 31 May 2019 16:59:02 GMT Received: from [192.168.1.222] (/71.63.128.209) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 31 May 2019 09:59:01 -0700 Subject: Re: [PATCH -mm] mm, swap: Fix bad swap file entry warning To: "Huang, Ying" , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrea Parri , "Paul E . McKenney" , Michal Hocko , Minchan Kim , Hugh Dickins References: <20190531024102.21723-1-ying.huang@intel.com> From: Mike Kravetz Message-ID: <2d8e1195-e0f1-4fa8-b0bd-b9ea69032b51@oracle.com> Date: Fri, 31 May 2019 09:59:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190531024102.21723-1-ying.huang@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9273 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905310104 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9273 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905310104 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/30/19 7:41 PM, Huang, Ying wrote: > From: Huang Ying > > Mike reported the following warning messages > > get_swap_device: Bad swap file entry 1400000000000001 > > This is produced by > > - total_swapcache_pages() > - get_swap_device() > > Where get_swap_device() is used to check whether the swap device is > valid and prevent it from being swapoff if so. But get_swap_device() > may produce warning message as above for some invalid swap devices. > This is fixed via calling swp_swap_info() before get_swap_device() to > filter out the swap devices that may cause warning messages. > > Fixes: 6a946753dbe6 ("mm/swap_state.c: simplify total_swapcache_pages() with get_swap_device()") > Signed-off-by: "Huang, Ying" Thank you, this eliminates the messages for me: Tested-by: Mike Kravetz -- Mike Kravetz