From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751934AbdASBW0 (ORCPT ); Wed, 18 Jan 2017 20:22:26 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:6609 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700AbdASBWX (ORCPT ); Wed, 18 Jan 2017 20:22:23 -0500 Subject: Re: [RFC] HWPOISON: soft offlining for non-lru movable page To: Michal Hocko References: <1484712054-7997-1-git-send-email-xieyisheng1@huawei.com> <20170118095148.GK7015@dhcp22.suse.cz> CC: , , , , , , , From: Yisheng Xie Message-ID: <85bb8e26-dfd9-19da-5444-e67502de4080@huawei.com> Date: Thu, 19 Jan 2017 09:21:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20170118095148.GK7015@dhcp22.suse.cz> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.40] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.588014CB.0080,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 78f30922c23a265f2f4d46c61e45d3d8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/1/18 17:51, Michal Hocko wrote: > On Wed 18-01-17 12:00:54, Yisheng Xie wrote: >> This patch is to extends soft offlining framework to support >> non-lru page, which already support migration after >> commit bda807d44454 ("mm: migrate: support non-lru movable page >> migration") >> >> When memory corrected errors occur on a non-lru movable page, >> we can choose to stop using it by migrating data onto another >> page and disable the original (maybe half-broken) one. > > soft_offline_movable_page duplicates quite a lot from > __soft_offline_page. Would it be better to handle both cases in > __soft_offline_page? > Hi Michal, Thanks for reviewing. Yes, the most code of soft_offline_movable_page is duplicates with __soft_offline_page, I use a single function to make code looks clear, just as what soft_offline_hugetlb_page do. I will try to make a v2 as your suggestion. Thanks Yisheng Xie.