Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968041AbdDTJ0h (ORCPT ); Thu, 20 Apr 2017 05:26:37 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52257 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966004AbdDTJ0Q (ORCPT ); Thu, 20 Apr 2017 05:26:16 -0400 From: Laurent Dufour To: Naoya Horiguchi Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org Subject: [RFC 1/2] mm: Uncharge poisoned pages Date: Thu, 20 Apr 2017 11:26:01 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492680362-24941-1-git-send-email-ldufour@linux.vnet.ibm.com> References: <1492680362-24941-1-git-send-email-ldufour@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17042009-0040-0000-0000-0000038CAF13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042009-0041-0000-0000-00001FC55A79 Message-Id: <1492680362-24941-2-git-send-email-ldufour@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-20_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704200076 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 664 Lines: 22 When page are poisoned, they should be uncharged from the root memory cgroup. Signed-off-by: Laurent Dufour --- mm/memory-failure.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 27f7210e7fab..00bd39d3d4cb 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -530,6 +530,7 @@ static const char * const action_page_types[] = { static int delete_from_lru_cache(struct page *p) { if (!isolate_lru_page(p)) { + memcg_kmem_uncharge(p, 0); /* * Clear sensible page flags, so that the buddy system won't * complain when the page is unpoison-and-freed. -- 2.7.4