From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424314AbcIZR2a (ORCPT ); Mon, 26 Sep 2016 13:28:30 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60237 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751340AbcIZR22 (ORCPT ); Mon, 26 Sep 2016 13:28:28 -0400 From: Gerald Schaefer To: Andrew Morton Cc: Naoya Horiguchi , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Hocko , "Kirill A . Shutemov" , Vlastimil Babka , Mike Kravetz , "Aneesh Kumar K . V" , Martin Schwidefsky , Heiko Carstens , Rui Teng , Dave Hansen Subject: [PATCH v4 0/3] mm/hugetlb: memory offline issues with hugepages Date: Mon, 26 Sep 2016 19:28:08 +0200 X-Mailer: git-send-email 2.8.4 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16092617-0040-0000-0000-000002E23716 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16092617-0041-0000-0000-00001D404CA4 Message-Id: <20160926172811.94033-1-gerald.schaefer@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-26_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609260327 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This addresses several issues with hugepages and memory offline. While the first patch fixes a panic, and is therefore rather important, the last patch is just a performance optimization. The second patch fixes a theoretical issue with reserved hugepages, while still leaving some ugly usability issue, see description. Changes in v4: - Add check for free vs. reserved hugepages - Revalidate checks in dissolve_free_huge_page() after taking the lock - Split up into 3 patches Changes in v3: - Add Fixes: c8721bbb - Add Cc: stable - Elaborate on losing the gigantic page vs. failing memory offline - Move page_count() check out of dissolve_free_huge_page() Changes in v2: - Update comment in dissolve_free_huge_pages() - Change locking in dissolve_free_huge_page() Gerald Schaefer (3): mm/hugetlb: fix memory offline with hugepage size > memory block size mm/hugetlb: check for reserved hugepages during memory offline mm/hugetlb: improve locking in dissolve_free_huge_pages() include/linux/hugetlb.h | 6 +++--- mm/hugetlb.c | 47 +++++++++++++++++++++++++++++++++++------------ mm/memory_hotplug.c | 4 +++- 3 files changed, 41 insertions(+), 16 deletions(-) -- 2.8.4