From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751759AbaKKUKd (ORCPT ); Tue, 11 Nov 2014 15:10:33 -0500 Received: from mail-lb0-f180.google.com ([209.85.217.180]:54500 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751086AbaKKUKc (ORCPT ); Tue, 11 Nov 2014 15:10:32 -0500 MIME-Version: 1.0 In-Reply-To: References: <1407998986-1834-1-git-send-email-gong.chen@linux.intel.com> <1407998986-1834-5-git-send-email-gong.chen@linux.intel.com> <20141111114248.GD31490@pd.tnic> <20141111161309.GG31490@pd.tnic> <20141111163059.GH31490@pd.tnic> <20141111182235.GL31490@pd.tnic> From: Andy Lutomirski Date: Tue, 11 Nov 2014 12:10:10 -0800 Message-ID: Subject: Re: [PATCH v2 4/5] x86/mce: Simplify flow when handling recoverable memory errors To: Borislav Petkov Cc: Chen Gong , X86 ML , Peter Zijlstra , Oleg Nesterov , Tony Luck , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 11, 2014 at 10:34 AM, Andy Lutomirski wrote: > On Tue, Nov 11, 2014 at 10:22 AM, Borislav Petkov wrote: >> On Tue, Nov 11, 2014 at 09:15:18AM -0800, Andy Lutomirski wrote: >>> Oh -- does it need to sleep? >> >> Oh yeah, iterates over all tasks and generally async access to VM stuff. >> You can have a look if bored: mm/memory-failure.c >> >> :-) >> >>> I find myself wondering whether a much cleaner solution might be to >>> sync regs and switch stacks before invoking do_machine_check rather >>> than afterwards. Then do_machine_check would really be completely >>> non-atomic. It would add a few lines of asm, though. >> >> That's like wagging the dog. > > Wagging this particular dog might shake some loose fur off. If we did > this for all paranoid entries, then paranoid_userspace could just be > deleted. :) Andi is about to make this dog even messier. I think I like my suggestion more and more. --Andy