From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752113AbdHPOhO (ORCPT ); Wed, 16 Aug 2017 10:37:14 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:34824 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530AbdHPOhM (ORCPT ); Wed, 16 Aug 2017 10:37:12 -0400 Subject: Re: [PATCH v7 2/9] mm, swap: Add infrastructure for saving page metadata on swap To: David Miller Cc: akpm@linux-foundation.org, dave.hansen@linux.intel.com, arnd@arndb.de, kirill.shutemov@linux.intel.com, mhocko@suse.com, jack@suse.cz, ross.zwisler@linux.intel.com, aneesh.kumar@linux.vnet.ibm.com, dave.jiang@intel.com, willy@infradead.org, hughd@google.com, minchan@kernel.org, hannes@cmpxchg.org, hillf.zj@alibaba-inc.com, shli@fb.com, mingo@kernel.org, jmarchan@redhat.com, lstoakes@gmail.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, sparclinux@vger.kernel.org, khalid@gonehiking.org References: <87ff7a44c45bd6a146102c6e6033ee7810d9ebb5.1502219353.git.khalid.aziz@oracle.com> <20170815.215326.1833101229202321710.davem@davemloft.net> From: Khalid Aziz Organization: Oracle Corp Message-ID: <05c64690-fa24-7104-4f1f-d98ff54863bc@oracle.com> Date: Wed, 16 Aug 2017 08:34:42 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170815.215326.1833101229202321710.davem@davemloft.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/15/2017 10:53 PM, David Miller wrote: > From: Khalid Aziz > Date: Wed, 9 Aug 2017 15:25:55 -0600 > >> @@ -1399,6 +1399,12 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma, >> (flags & TTU_MIGRATION)) { >> swp_entry_t entry; >> pte_t swp_pte; >> + >> + if (arch_unmap_one(mm, vma, address, pteval) < 0) { >> + set_pte_at(mm, address, pvmw.pte, pteval); >> + ret = false; >> + page_vma_mapped_walk_done(&pvmw); >> + break; >> /* >> * Store the pfn of the page in a special migration >> * pte. do_swap_page() will wait until the migration >> @@ -1410,6 +1416,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma, >> if (pte_soft_dirty(pteval)) >> swp_pte = pte_swp_mksoft_dirty(swp_pte); >> set_pte_at(mm, address, pvmw.pte, swp_pte); >> + } > > This basic block doesn't look right. I think the new closing brace is > intended to be right after the new break; statement. If not at the > very least the indentation of the existing code in there needs to be > adjusted. Hi Dave, Thanks. That brace needs to move up right after break. I will fix that. -- Khalid