From patchwork Mon Nov 26 23:13:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 10699323 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 093C013BB for ; Mon, 26 Nov 2018 23:13:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDF662A63D for ; Mon, 26 Nov 2018 23:13:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E255C2A63F; Mon, 26 Nov 2018 23:13:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73D122A63D for ; Mon, 26 Nov 2018 23:13:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 131076B444B; Mon, 26 Nov 2018 18:13:14 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0DF2E6B444C; Mon, 26 Nov 2018 18:13:14 -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 EC2236B444D; Mon, 26 Nov 2018 18:13:13 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by kanga.kvack.org (Postfix) with ESMTP id AA2CC6B444B for ; Mon, 26 Nov 2018 18:13:13 -0500 (EST) Received: by mail-pg1-f199.google.com with SMTP id a18so8781155pga.16 for ; Mon, 26 Nov 2018 15:13:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:date:from:to:cc:subject :message-id:user-agent:mime-version; bh=z3q409DiVVXxMVoSaI5IoeQNCcKYwHOBnYW8ZX89Fyg=; b=ZmgAeVgWs4e/hP8+rUmuNSp1MU07YiEn7WwVCEiRFWzdIj/C35q0YrPEjE5A77IA/O iR99dF27l/INDIOkgMDmkT9HFC7McNakG+T5wrV+YpvAF0CL3F4p+tl/KmeZYDIk+ipv poqGJP7WMPzZrJvhRPMSC4F5HomVvA8MqCohRE5lLpz0XItuDu4u3o6nEN8WU5uY1ZW2 Nn2y6qVWffgxC161X/l6tpbyTkj0wJfPZUCiNWcCkS9f/bz7LAEr0f27NNyRm/oX3As9 vajOoYATnbUg8xuYLtU0dja6xa6sefmitdz6vVvOd/2kzOXhEJCetp/wF3z+3Xly60jK gXqA== X-Gm-Message-State: AA+aEWZGUtrGde3HT2Yaqf4zYxzagxHrCRRN/o+0viHGD6zr9FVXq3OS 9EKIQE2PZuF41qtDbERDLOk3hekrJ9ZoXRmKyEVj8JFEKxxJ+LhqYhT4FA+kxFsTMoS9q/lbRCX vbriizLAl3q/WUqtlHItI5ze/qkrOZfvyJOr+u/YbJFp/aDKBAGhJ8ZTfcW3CIOkBTNbUwzsvUV EjGRQEW4pzeSbLrsyNIwykH2oYiXr7ksdk6A8WbPe8KYavnBhc8DdSyPZBw9XNUKb3AEMVToAyB 4d41/RqL+/QZyKjcNV0k3dtgG3rbNppN9JgFaDEWtzJi9gFIZLmF2aITICGA6szDyZBTztt5EK8 CbN1VnvOO00zFkaFGKX8HyVN9y3n2CzvOtUFrvT1WdYzfxlWOSitPSb/A7UeupEgzTkfnpSZSkT L X-Received: by 2002:a63:4745:: with SMTP id w5mr27415267pgk.377.1543273993339; Mon, 26 Nov 2018 15:13:13 -0800 (PST) X-Received: by 2002:a63:4745:: with SMTP id w5mr27415223pgk.377.1543273992633; Mon, 26 Nov 2018 15:13:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543273992; cv=none; d=google.com; s=arc-20160816; b=t7h4b6ivNvVBKVuPMQSs8Q5p+sXPRjqx7BGw31Cc5oN5CwSZvUf2P31p8AA4VJQp2Z lH8LQUNlJoii3hdD9SZTcp8CSddDIRspyyaJ7cwfOHN0vr9EFjB6ZJ7S6UtB/BFDDbOS j9xCXbmkphYBLI5R2CuP7vnG3lcqRShJAzTsREjVf+HN+Cw0BSOfnz8lHAcz7rhHwd8H eSXb0fdViyKB7EL8UWm6PLmAeJBW4m72CSuw1wC2nUlyPbE1MjKsX8JNsvSEaExZpwo0 hFSMxEtqNuD+7FoqsrmDJ4aXWPRVGqg8ET68Q/kL3n99pgK4KgON+p6fCTlWnz/S0yiV Sjfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:subject:cc:to:from:date :dkim-signature; bh=z3q409DiVVXxMVoSaI5IoeQNCcKYwHOBnYW8ZX89Fyg=; b=fZGgxj9SF9ZNWHVEH1nfxyMsWq+P3olqfN5Qlboc5Vda0STi72oGzrTH2zifaHyb4r W+2MwxpmaXMEoqB3RENF1FRMgivz3GjzPEo5ClCD8pGEx2SpjiNY1wj6oDoYT82UWeX2 nBe24Ek56BQIefOxmDjDQ2ARiW3OKKkVmhArQm/Ms0ibOBJe+6kcRy1fEi5i2G6Vpe6f /m/L4XQjg3JWw/Vqq6aSku3JXfwtDMl7cdAGdLLTfbX0gipA+TknVw9ZpOhnLY+L/boF 8WdWhvM+EttcB1z9jiwR1UJWMtFIOyl5h9tW6yOwa+4qtyUiTJPLD+Pa/SuIWq9Wx8Lw 1jaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Jwmgsj4+; spf=pass (google.com: domain of hughd@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o10-v6sor2483520plk.56.2018.11.26.15.13.12 for (Google Transport Security); Mon, 26 Nov 2018 15:13:12 -0800 (PST) Received-SPF: pass (google.com: domain of hughd@google.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Jwmgsj4+; spf=pass (google.com: domain of hughd@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=z3q409DiVVXxMVoSaI5IoeQNCcKYwHOBnYW8ZX89Fyg=; b=Jwmgsj4+TJ1s9gfhs+cMZ5QqwxKKx/sqoZTDIYSnuQjGvMWSZp8N9PY1dq9M6Q3XRV hS7PvtGwdXEauU9PS94ny+KxLW1i35QF8ozuDlxHNRvkZN9AIrXKpdiIx5g3xJST6XK5 cxf3/VU1P3nYRsUKZdWiz6q0RPk7PLUgiRYfqpO3IJw1oEZ0PmoIX/RaIVUHOZcTT0vH IMaweZQ/+WE88ugDvFOx+3RTY28WiWhKxvSNbYYkOOhtHRTs9ZfGNyc6OtghFXvLC9zn WNO/uTlbbEDuAAxtAmICTxuhwa6qQKQwBdJDmP6Woayi0tPZX/WGORrcPB1bSE8U587n K5sg== X-Google-Smtp-Source: AFSGD/WxjiVWnCtgnKtLJ7ZD+bxrCoXUjljOC1mbZTVwZ1+UtjNOgfjux1YsYxmaWhJGm8jKWuSj1A== X-Received: by 2002:a17:902:b18b:: with SMTP id s11mr14106067plr.56.1543273991561; Mon, 26 Nov 2018 15:13:11 -0800 (PST) Received: from [100.112.89.103] ([104.133.8.103]) by smtp.gmail.com with ESMTPSA id g26sm1795848pfh.61.2018.11.26.15.13.10 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Nov 2018 15:13:10 -0800 (PST) Date: Mon, 26 Nov 2018 15:13:03 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Andrew Morton cc: "Kirill A. Shutemov" , "Kirill A. Shutemov" , Matthew Wilcox , linux-mm@kvack.org Subject: [PATCH 00/10] huge_memory,khugepaged tmpfs split/collapse fixes Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 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: X-Virus-Scanned: ClamAV using ClamSMTP Hi Andrew, Here's a set of 10 patches, mostly fixing some crashes and lockups which can happen when khugepaged collapses tmpfs pages to huge: by-products of ongoing work to extend upstream's huge tmpfs to match what we need in Google (but no enhancements included here). Against v4.20-rc2 == v4.20-rc4: sorry, I haven't looked yet to see what clashes there might be with mmotm, because I believe that although these are all (except 10/10) to long-standing bugs, they still deserve to get into v4.20 and -stable. See what you think. Most of the testing has been on the whole series, and on a slightly earlier kernel: the move to XArray means that almost none of these patches will apply cleanly to v4.19 or earlier, but I do have the equivalents lined up ready. mm/huge_memory.c | 43 ++++++++----- mm/khugepaged.c | 140 ++++++++++++++++++++++++++------------------- mm/rmap.c | 13 ---- mm/shmem.c | 6 + 4 files changed, 114 insertions(+), 88 deletions(-) 1/10 mm/huge_memory: rename freeze_page() to unmap_page() 2/10 mm/huge_memory: splitting set mapping+index before unfreeze 3/10 mm/huge_memory: fix lockdep complaint on 32-bit i_size_read() 4/10 mm/khugepaged: collapse_shmem() stop if punched or truncated 5/10 mm/khugepaged: fix crashes due to misaccounted holes 6/10 mm/khugepaged: collapse_shmem() remember to clear holes 7/10 mm/khugepaged: minor reorderings in collapse_shmem() 8/10 mm/khugepaged: collapse_shmem() without freezing new_page 9/10 mm/khugepaged: collapse_shmem() do not crash on Compound 10/10 mm/khugepaged: fix the xas_create_range() error path Thanks, Hugh