From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755227AbdBGQ55 (ORCPT ); Tue, 7 Feb 2017 11:57:57 -0500 Received: from resqmta-ch2-08v.sys.comcast.net ([69.252.207.40]:37272 "EHLO resqmta-ch2-08v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754088AbdBGQ54 (ORCPT ); Tue, 7 Feb 2017 11:57:56 -0500 Date: Tue, 7 Feb 2017 10:55:51 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Michal Hocko cc: Mel Gorman , Vlastimil Babka , Dmitry Vyukov , Tejun Heo , "linux-mm@kvack.org" , LKML , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , syzkaller , Andrew Morton Subject: Re: mm: deadlock between get_online_cpus/pcpu_alloc In-Reply-To: <20170207164130.GY5065@dhcp22.suse.cz> Message-ID: References: <2cdef192-1939-d692-1224-8ff7d7ff7203@suse.cz> <20170207102809.awh22urqmfrav5r6@techsingularity.net> <20170207103552.GH5065@dhcp22.suse.cz> <20170207113435.6xthczxt2cx23r4t@techsingularity.net> <20170207114327.GI5065@dhcp22.suse.cz> <20170207123708.GO5065@dhcp22.suse.cz> <20170207135846.usfrn7e4znjhmogn@techsingularity.net> <20170207141911.GR5065@dhcp22.suse.cz> <20170207153459.GV5065@dhcp22.suse.cz> <20170207162224.elnrlgibjegswsgn@techsingularity.net> <20170207164130.GY5065@dhcp22.suse.cz> Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfERZtP72cCt8eM03EDwNbFi/h4uIDF8Jl7hQFWTeC+O6Lk+n+skLFhzkRaDv5B7negl+8rEKwlQQ4YYFhc41VTZGvo6qtxApWkA9nmZN5ZgSUv4q6jDG FYGDY5VtJVH6gXzshs9OWV+y1uWHVfxae8RVDeXj6vBftJKTyX7zW4OQe0mgfTudTpnlYmc6+dJ77fE4RIygM8FV5aJexTVaLp0a6g2VcYQwTOVor1wl7zGa qF53WEGGKJuXaNpmSLKez23MB3m9Nz2eSL7xIuO0fHxRnjWDL/N3OCXcc36NOtEZ35gWOeS21BB55ZQ7AIhcuwtDe91tzcnRh9+CDXk2+hfQ9r+6nNjCFnqJ KBr1s1boz5So9Wj8BJonmAAVUnYQTHxl7nrJQEXWTABbTJnk16CGqLxXiB0k+nwFXNuzM/D4WL6IPEwHfoHKfo/AgBRNEO7Y53uUlZFzPEE+JLcIvydB/3Oh jrm0rsYnn7r+gsLKPew/ofyTj1o+qlivzcMo4g== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Feb 2017, Michal Hocko wrote: > I am always nervous when seeing hotplug locks being used in low level > code. It has bitten us several times already and those deadlocks are > quite hard to spot when reviewing the code and very rare to hit so they > tend to live for a long time. Yep. Hotplug events are pretty significant. Using stop_machine_XXXX() etc would be advisable and that would avoid the taking of locks and get rid of all the ocmplexity, reduce the code size and make the overall system much more reliable. Thomas? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f200.google.com (mail-io0-f200.google.com [209.85.223.200]) by kanga.kvack.org (Postfix) with ESMTP id 986766B0069 for ; Tue, 7 Feb 2017 11:55:56 -0500 (EST) Received: by mail-io0-f200.google.com with SMTP id 101so117265167iom.7 for ; Tue, 07 Feb 2017 08:55:56 -0800 (PST) Received: from resqmta-ch2-09v.sys.comcast.net (resqmta-ch2-09v.sys.comcast.net. [2001:558:fe21:29:69:252:207:41]) by mx.google.com with ESMTPS id e192si12249705iof.103.2017.02.07.08.55.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 08:55:55 -0800 (PST) Date: Tue, 7 Feb 2017 10:55:51 -0600 (CST) From: Christoph Lameter Subject: Re: mm: deadlock between get_online_cpus/pcpu_alloc In-Reply-To: <20170207164130.GY5065@dhcp22.suse.cz> Message-ID: References: <2cdef192-1939-d692-1224-8ff7d7ff7203@suse.cz> <20170207102809.awh22urqmfrav5r6@techsingularity.net> <20170207103552.GH5065@dhcp22.suse.cz> <20170207113435.6xthczxt2cx23r4t@techsingularity.net> <20170207114327.GI5065@dhcp22.suse.cz> <20170207123708.GO5065@dhcp22.suse.cz> <20170207135846.usfrn7e4znjhmogn@techsingularity.net> <20170207141911.GR5065@dhcp22.suse.cz> <20170207153459.GV5065@dhcp22.suse.cz> <20170207162224.elnrlgibjegswsgn@techsingularity.net> <20170207164130.GY5065@dhcp22.suse.cz> Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Mel Gorman , Vlastimil Babka , Dmitry Vyukov , Tejun Heo , "linux-mm@kvack.org" , LKML , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , syzkaller , Andrew Morton On Tue, 7 Feb 2017, Michal Hocko wrote: > I am always nervous when seeing hotplug locks being used in low level > code. It has bitten us several times already and those deadlocks are > quite hard to spot when reviewing the code and very rare to hit so they > tend to live for a long time. Yep. Hotplug events are pretty significant. Using stop_machine_XXXX() etc would be advisable and that would avoid the taking of locks and get rid of all the ocmplexity, reduce the code size and make the overall system much more reliable. Thomas? -- 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