Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751479AbbEGWhR (ORCPT ); Thu, 7 May 2015 18:37:17 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52780 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876AbbEGWhO (ORCPT ); Thu, 7 May 2015 18:37:14 -0400 Date: Fri, 8 May 2015 08:37:00 +1000 From: NeilBrown To: Jiri Kosina Cc: Oleg Nesterov , Ingo Molnar , Linus Torvalds , Evgeniy Polyakov , Stephen Smalley , Alex Williamson , linux-kernel , kvm Subject: Re: [PATCH] signals: Generate warning when flush_signals() is called from non-kthread context Message-ID: <20150508083700.7a0ff4f8@notabene.brown> In-Reply-To: References: <1430502057.4472.255.camel@redhat.com> <20150501193813.GA2812@gmail.com> <20150502183001.07eae212@notabene.brown> <20150504173515.GA12200@redhat.com> X-Mailer: Claws Mail 3.10.1-162-g4d0ed6 (GTK+ 2.24.25; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/YFc91eZP6POREtWZoNlmF=K"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2713 Lines: 69 --Sig_/YFc91eZP6POREtWZoNlmF=K Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 7 May 2015 15:33:53 +0200 (CEST) Jiri Kosina wrot= e: > On Mon, 4 May 2015, Oleg Nesterov wrote: >=20 > > > All the calls in md.c are in a kernel thread so safe, but I'd rather = have an > > > explicit "uninterruptible, but no load-average" wait.... > >=20 > > Could you please explain why md_thread() does allow_signal(SIGKILL) ? > >=20 > > I am just curious. It looks as if we want to allow user-space to "call" > > thread->run(), and this looks strange. >=20 > One would think that this is because md wants to be notified when system= =20 > is going to be halted/rebooted, and userspace init (whatever that is)=20 > decides to do 'kill -9 -1' to perform the final shutdown of md (the=20 > question is why it really should be needed, becasue all filesystems shoul= d=20 > be R/O by that time anyway). >=20 Something like that. It is historical strangeness that might have seemed like a good idea at the time, but is hard to justify. There is an alt-sysrq that will remount filesystems read-only, but no alt-sysrq to switch RAID arrays to "idle/clean". So I leverages alt-sysrq-= K, which does "kill -9 -1" (I think). Since md gained the ability to switch to idle/clean after a short timeout, and also the ability to use a write-intent-bitmap so only little bits of the array are ever non idle/clean, this all became much less interesting. NeilBrown --Sig_/YFc91eZP6POREtWZoNlmF=K Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIVAwUBVUvpDTnsnt1WYoG5AQK2zBAAvtTrLUwc7Xuaehe3drT40MVzl8DWmmVC fm0ja00LHXgo/y+LeV2oS4OKNIzq21eMu6Qd5WPaqKq2i/133mxACLuY+tA4PNqZ N7V5e82YoHiwSEFt8qv/zLw/EvfEErgydMDrJjlV3MAy5h/dXFwjmEAvg44wwM0d bjFJvXJZCXUjFikSCjqakfofxv2IPN41W9GcvieX2LpvsnM/R9wz6MO8MufNUhZ+ 2h96iXedeQDV7JKm/B0k6IWKvhvHPSloPvqkOBGxOxYsejzejjud0IXAY5ZidieJ 2Yy22ZREnMj60JqLAjvhmqu5Shxk4IMXCUMsFcvkSdt5KhuY8vlhGXrYweBudzR/ Ig0H6pXXegRNYKF03z8dKmoxgIp2+BgY6lLmGBmrRWXF5S1sKH8SrtkcwIpzOipE IZczJfXVJ9gBxrDphach6vrtwdAtBNY4zkWzdkBYLCPwug492+zJC2ig5RWGE+Ph tV3KcXfd+b+a2+KufChqMZD23sT05HjTpJtyJ6sGeYIIBW4noy47LV3Q9LdX9hCI Vm2OoEIvSynXNl/XG2I5n5qMw0Pb3YR5bDBE1LQYvcVkzPzb+cSCLlzt1FSUfGMm sDY15vtWswkaGrHlOHRJY84gI4YYewY6sVXQhW39Odfl5jbLRYBFqBvz0lovyTeB P6JpZSJftGc= =VyqO -----END PGP SIGNATURE----- --Sig_/YFc91eZP6POREtWZoNlmF=K-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/