From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EF93CA9EA0 for ; Sun, 20 Oct 2019 15:24:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BAA76218BA for ; Sun, 20 Oct 2019 15:24:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="LK3ejOPl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAA76218BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 290678E0005; Sun, 20 Oct 2019 11:24:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2681C8E0003; Sun, 20 Oct 2019 11:24:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A6C68E0005; Sun, 20 Oct 2019 11:24:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id EBC4B8E0003 for ; Sun, 20 Oct 2019 11:24:11 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 8FB30181AEF10 for ; Sun, 20 Oct 2019 15:24:11 +0000 (UTC) X-FDA: 76064533902.17.ant62_76abf7b6562a X-HE-Tag: ant62_76abf7b6562a X-Filterd-Recvd-Size: 2702 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Sun, 20 Oct 2019 15:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: 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=4ZH3C9BlRkulrqsRUN1NO9rzPeBK4dlwWV9oddVh+sM=; b=LK3ejOPlikkCcTsnulHKdpcnl 8s6WJyrbr4VzaJhIiWuCrdk2S3F93UW6m9ES+6eLTaDcxPzvqHUHezP0h8EeBnZEFm1dXZHSt93NY 9bI7xgyr+9+S+h9gK7aRSnuNQRkBs//8au2GkhNvOQ+HycWVHjHK1sOLqPJG93NP1Q84ptSepiLBD WSNO7FYuzuPxU29XV0eAPoIEqe4P8tjp5v/N0OvhIKcxwdSyzXaHdXOzBVOCPGeMs3bysMRppp6AJ bixYWWRZlMZHAStqP6CSgGuYDu0Dh2ZLV73DoS7cbMxyuGVL6SwXGumUxW81dAtqZ7szAuUfjnsok 74SW3yOkA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMD3o-0006br-E1; Sun, 20 Oct 2019 15:24:00 +0000 Date: Sun, 20 Oct 2019 08:24:00 -0700 From: Matthew Wilcox To: Hillf Danton Cc: linux-mm , Andrew Morton , linux-kernel , Michal Hocko , Johannes Weiner , Shakeel Butt , Minchan Kim , Mel Gorman , Vladimir Davydov , Jan Kara Subject: Re: [RFC v1] mm: add page preemption Message-ID: <20191020152400.GA9214@bombadil.infradead.org> References: <20191020134304.11700-1-hdanton@sina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191020134304.11700-1-hdanton@sina.com> User-Agent: Mutt/1.12.1 (2019-06-15) 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: On Sun, Oct 20, 2019 at 09:43:04PM +0800, Hillf Danton wrote: > First on the page side, page->prio that is used to mirror the prio > of page owner tasks is added, and a couple of helpers for setting, > copying and comparing page->prio to help to add pages to lru. Um, no. struct page is 64 bytes and shall remain so without a very very good reason. > @@ -197,6 +198,10 @@ struct page { > /* Usage count. *DO NOT USE DIRECTLY*. See page_ref.h */ > atomic_t _refcount; > > +#ifdef CONFIG_PAGE_PREEMPTION > + int prio; /* mirror page owner task->prio */ > +#endif > + > #ifdef CONFIG_MEMCG > struct mem_cgroup *mem_cgroup; > #endif