From patchwork Wed Nov 6 06:09:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Liu X-Patchwork-Id: 11229361 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5D4E15AB for ; Wed, 6 Nov 2019 06:10:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 64A94214D8 for ; Wed, 6 Nov 2019 06:10:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="Id1K7J29" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64A94214D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=fb.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B59016B000A; Wed, 6 Nov 2019 01:10:05 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B0A3B6B000E; Wed, 6 Nov 2019 01:10:05 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A1F7C6B0010; Wed, 6 Nov 2019 01:10:05 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 8CB8E6B000A for ; Wed, 6 Nov 2019 01:10:05 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 39F3C45D8 for ; Wed, 6 Nov 2019 06:10:05 +0000 (UTC) X-FDA: 76124827170.19.prose51_5800d69566c08 X-Spam-Summary: 2,0,0,1a50c595f80ce89f,d41d8cd98f00b204,prvs=6213cc43f4=songliubraving@fb.com,:linux-kernel@vger.kernel.org::akpm@linux-foundation.org:matthew.wilcox@oracle.com:kernel-team@fb.com:william.kucharski@oracle.com:kirill.shutemov@linux.intel.com:songliubraving@fb.com,RULES_HIT:41:69:355:379:541:988:989:1260:1261:1277:1313:1314:1345:1437:1516:1518:1534:1538:1711:1714:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3350:3866:3868:3870:3871:4250:4362:5007:6119:6261:6653:7903:8957:10004:10400:11658:11914:12043:12291:12297:12683:12895:13069:13311:13357:14095:14394:14721:21080:21324:21451:21627:30054:30064,0,RBL:67.231.145.42:@fb.com:.lbl8.mailshell.net-62.2.0.100 64.100.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: prose51_5800d69566c08 X-Filterd-Recvd-Size: 3231 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Wed, 6 Nov 2019 06:10:04 +0000 (UTC) Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xA66A2Jv030248 for ; Tue, 5 Nov 2019 22:10:03 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=iBiMo+12y6HLPZMvxe/0Ndb0dqSCd+cXriHq+6VsBx8=; b=Id1K7J29/MVtCajtXkD61JsiLizYsvBj7UnMnJ6WvGRiYX8CrlEQeYdekTk0ax72kLCt eCCZ6QX4jpI1AF2wUo1UIPrDtIP9KWkRjb7uQ3EuuYvr+RBxFIhA5gbg4aIP6nlu5M9k jLpwdLiMSMXfxGlSxgNDLTw9LIUsERFL4sI= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com with ESMTP id 2w3ddeugp8-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 05 Nov 2019 22:10:03 -0800 Received: from 2401:db00:30:6012:face:0:17:0 (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:82::d) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 5 Nov 2019 22:09:50 -0800 Received: by devbig006.ftw2.facebook.com (Postfix, from userid 4523) id E6D5262E36EB; Tue, 5 Nov 2019 22:09:48 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Song Liu Smtp-Origin-Hostname: devbig006.ftw2.facebook.com To: , , CC: , , , , Song Liu Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH v5 0/2] fix and improvement for file THP Date: Tue, 5 Nov 2019 22:09:28 -0800 Message-ID: <20191106060930.2571389-1-songliubraving@fb.com> X-Mailer: git-send-email 2.17.1 X-FB-Internal: Safe MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-06_01:2019-11-05,2019-11-06 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 lowpriorityscore=0 spamscore=0 mlxscore=0 suspectscore=0 mlxlogscore=466 phishscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 impostorscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1911060064 X-FB-Internal: deliver 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: This set includes a fix and an improvement for file THP. 1/2 fixes pagecache corruption for file THP, where !PageUptodate page gets collapsed into huge page. 1/2 is needed for 5.4. 2/2 improve collapse of file THP by flushing dirty page in collapse_file(). 2/2 can wait until 5.5. Thanks, Song Song Liu (2): mm,thp: recheck each page before collapsing file THP mm/thp: flush file for !is_shmem PageDirty() case in collapse_file() mm/khugepaged.c | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) --- 2.17.1