From patchwork Fri May 18 19:45:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10411973 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 57ABC602C2 for ; Fri, 18 May 2018 19:45:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46C37286AA for ; Fri, 18 May 2018 19:45:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AD6A289F0; Fri, 18 May 2018 19:45:32 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID 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 AEDCB286AA for ; Fri, 18 May 2018 19:45:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B44CC6B0661; Fri, 18 May 2018 15:45:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AF2F36B0664; Fri, 18 May 2018 15:45:25 -0400 (EDT) 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 96BCE6B0665; Fri, 18 May 2018 15:45:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f197.google.com (mail-pf0-f197.google.com [209.85.192.197]) by kanga.kvack.org (Postfix) with ESMTP id 3D1B06B0661 for ; Fri, 18 May 2018 15:45:25 -0400 (EDT) Received: by mail-pf0-f197.google.com with SMTP id 62-v6so5270346pfw.21 for ; Fri, 18 May 2018 12:45:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=r8Ms7U04nfkNuFb8hrHqNkcG+4+NyOwJOLMcvWQt04o=; b=Pf6m2ghfR1tHTyuOdf3Qp7OYZSPq4O5pNqn6e7mr5aHM/SPLY92OIjUOOQD1A4k4gK QzW7o8UcwyzP8jC6xePII6obq3Qc8c+gDFSBpxGpBIG49ylIxdz3JwwT1tFqqfUtrhU5 jlkrurMUx0rdnXFFyblGd0VbNq/bHCYq5Wg/8o++c1llr1U1qscGU1w72rxtJoZsnrlt DTB2U2j/B9gwbWacmNjCoeELG83XfUGtqnpSU8NmQ7jESWTBYcVecP/3HeUgdGCNtaWc l5P6bxtORVkH16esOZga7LEpH7xq2y0RV1toAe9Tbyx6ph8ZgRfy8RcP37SgRYlDSv8J rGfw== X-Gm-Message-State: ALKqPwcUi3ojDxnic+ETMenOv8G54KrMjPqRULbv20WAY0A2dWU4Hdky sMmPQ5UuvUX0yVoM2L6/qI5mUXOmXlssQeOCyPzpTEMskhRvEDModdwNuw+D4WpkJ1IAks8xySa k815X5VcQVs/GoD0pLaSdn2AjHiWmL20Xl6k75/YatfqpjazyY+fEGfR+DBofLMcGaQ== X-Received: by 2002:a62:d286:: with SMTP id c128-v6mr10730364pfg.240.1526672724935; Fri, 18 May 2018 12:45:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqUqNdhK/eMD5HbHBCL4TddvTo+4rp38DQcDdxw7Gj7o366WWOEVnNqXy6iWFXKAbHnwNks X-Received: by 2002:a62:d286:: with SMTP id c128-v6mr10730310pfg.240.1526672723558; Fri, 18 May 2018 12:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526672723; cv=none; d=google.com; s=arc-20160816; b=SdkOKcGjfmHTKQ4eK8VuIgc/mCK1xZ9BWrFRwLM7DkcC7XSz5wQQAX9Dw7WOfpwawj m7gR4GPfplbDXgeCe6hZfxSGHHKLW4tb1JXkoRbLf9szXOFAhXgJh+NXvsZLVv/fdqG9 2TGSYBy7p8TZvgasCtD8DSqwfgc42bZW3c5Qx8T2lzQpbzNs49C2qmJpiUrBoDSDbvjX thMR7xrzODduzRTFR2jwvPH48ycOGMCWIDUiYNrgST7Br2Oi4SK5hoUCa0xUtHB30hRO qNYilkQNJagxviX7kBTC9YuHXm44U43pwoq+JY/TpRtIgUmr5tlkVeQWElMzzOKhqO4J vuNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=r8Ms7U04nfkNuFb8hrHqNkcG+4+NyOwJOLMcvWQt04o=; b=kLbp2uhQEHyzXff/WNqwwyQzZP73Zhs3wxBt9ZVdDccFeFRWageFz8wKQiU4NCzpZP rncMXKMV6I0ykFWO9Te+gKqDX4FJ5iSWZ7Evw+0TTld0MkMN18+CDE2HSdrUh7sXQQdR 25BYA49HpdHKMlokHZKfS81NO2XROOSY8ZKAcvTiWmD1RhaLooHTAU4Hge9NjvUZmcdA e/bg5v1ktiqqN6u6cw4889mYjjMuq++2rgesxHyGukGmQl5+cd+xi8PfB89CMfQjfUM/ k/3LVZQ5j5UlCE1iTL9rXzuZb4/UiFvxrBlwwBJBl1msFVd49aITMx/5bNHGBQDbhN/B /i0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=qsiTsZG4; spf=pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=willy@infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id 91-v6si8193208plh.488.2018.05.18.12.45.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 May 2018 12:45:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=qsiTsZG4; spf=pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=willy@infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=r8Ms7U04nfkNuFb8hrHqNkcG+4+NyOwJOLMcvWQt04o=; b=qsiTsZG4vw0/k6V4ZC0meSM4D tUeF3B+m5HxEOUY3LrWdPHYxztXsY+ftCgyXpXHgdv4lkoF0e+yTmzfSFcvNI/2ymvAwU+DSPWORI A0QMAobJ7UnrwA2JNz74186WCq41ahG/jE8eT0XLBGHEy48xtkKU2eHt1n22F2FX2xuodzYzCNzQT oUvhCWjwZjp1yoVyW3xm1LpG9WUTIZQHsA10n9hUQuzczqRcONJQUBfnhw6uy2QKIwlR6EqdUE4Kp XybpfCmzBtJvodQuA+5I0m94u1EtC4Bp/PWjaUdufNQsPNtqwsM7ONAVYDg3qzcXgvOf1I8Hu6b84 aD+XY/1/w==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJlJa-000110-U8; Fri, 18 May 2018 19:45:22 +0000 From: Matthew Wilcox To: linux-mm@kvack.org Cc: Matthew Wilcox , Andrew Morton , "Kirill A . Shutemov" , Christoph Lameter , Lai Jiangshan , Pekka Enberg , Vlastimil Babka , Dave Hansen , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= Subject: [PATCH v6 08/17] mm: Use page->deferred_list Date: Fri, 18 May 2018 12:45:10 -0700 Message-Id: <20180518194519.3820-9-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180518194519.3820-1-willy@infradead.org> References: <20180518194519.3820-1-willy@infradead.org> 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 From: Matthew Wilcox Now that we can represent the location of 'deferred_list' in C instead of comments, make use of that ability. Signed-off-by: Matthew Wilcox Acked-by: Vlastimil Babka Acked-by: Kirill A. Shutemov --- mm/huge_memory.c | 7 ++----- mm/page_alloc.c | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index a3a1815f8e11..cb0954a6de88 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -483,11 +483,8 @@ pmd_t maybe_pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma) static inline struct list_head *page_deferred_list(struct page *page) { - /* - * ->lru in the tail pages is occupied by compound_head. - * Let's use ->mapping + ->index in the second tail page as list_head. - */ - return (struct list_head *)&page[2].mapping; + /* ->lru in the tail pages is occupied by compound_head. */ + return &page[2].deferred_list; } void prep_transhuge_page(struct page *page) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index da3eb2236ba1..1a0149c4f672 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -933,7 +933,7 @@ static int free_tail_pages_check(struct page *head_page, struct page *page) case 2: /* * the second tail page: ->mapping is - * page_deferred_list().next -- ignore value. + * deferred_list.next -- ignore value. */ break; default: