From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752515AbbFMS7o (ORCPT ); Sat, 13 Jun 2015 14:59:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40681 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750910AbbFMS7f (ORCPT ); Sat, 13 Jun 2015 14:59:35 -0400 Date: Sat, 13 Jun 2015 20:58:28 +0200 From: Oleg Nesterov To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andy Lutomirski , Andrew Morton , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Thomas Gleixner , Waiman Long Subject: why do we need vmalloc_sync_all? Message-ID: <20150613185828.GA32376@redhat.com> References: <1434188955-31397-1-git-send-email-mingo@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434188955-31397-1-git-send-email-mingo@kernel.org> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I didn't read v2 yet, but I'd like to ask a question. Why do we need vmalloc_sync_all()? It has a single caller, register_die_notifier() which calls it without any explanation. IMO, this needs a comment at least. I am not sure I understand the changelog in 101f12af correctly, but at first glance vmalloc_sync_all() is no longer needed at least on x86, do_page_fault() no longer does notify_die(DIE_PAGE_FAULT). And btw DIE_PAGE_FAULT has no users. DIE_MNI too... Perhaps we can simply kill it on x86? As for other architectures I am not sure. arch/tile implements vmalloc_sync_all() and uses notify_die() in do_page_fault(). And in any case register_die_notifier()->vmalloc_sync() looks strange. If (say) arch/tile needs this to fix the problem with modules, perhaps it should do vmalloc_sync_all() in do_init_module() paths? Oleg. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f169.google.com (mail-qc0-f169.google.com [209.85.216.169]) by kanga.kvack.org (Postfix) with ESMTP id E7B646B0038 for ; Sat, 13 Jun 2015 14:59:36 -0400 (EDT) Received: by qcxj20 with SMTP id j20so2130711qcx.2 for ; Sat, 13 Jun 2015 11:59:36 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id k109si7717587qgf.32.2015.06.13.11.59.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2015 11:59:36 -0700 (PDT) Date: Sat, 13 Jun 2015 20:58:28 +0200 From: Oleg Nesterov Subject: why do we need vmalloc_sync_all? Message-ID: <20150613185828.GA32376@redhat.com> References: <1434188955-31397-1-git-send-email-mingo@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434188955-31397-1-git-send-email-mingo@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andy Lutomirski , Andrew Morton , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Thomas Gleixner , Waiman Long I didn't read v2 yet, but I'd like to ask a question. Why do we need vmalloc_sync_all()? It has a single caller, register_die_notifier() which calls it without any explanation. IMO, this needs a comment at least. I am not sure I understand the changelog in 101f12af correctly, but at first glance vmalloc_sync_all() is no longer needed at least on x86, do_page_fault() no longer does notify_die(DIE_PAGE_FAULT). And btw DIE_PAGE_FAULT has no users. DIE_MNI too... Perhaps we can simply kill it on x86? As for other architectures I am not sure. arch/tile implements vmalloc_sync_all() and uses notify_die() in do_page_fault(). And in any case register_die_notifier()->vmalloc_sync() looks strange. If (say) arch/tile needs this to fix the problem with modules, perhaps it should do vmalloc_sync_all() in do_init_module() paths? Oleg. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org