From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755476AbbI2GmD (ORCPT ); Tue, 29 Sep 2015 02:42:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60186 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755328AbbI2Gl6 (ORCPT ); Tue, 29 Sep 2015 02:41:58 -0400 Date: Tue, 29 Sep 2015 07:41:51 +0100 From: Aaron Tomlin To: Ulrich Obergfell Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, dzickus@redhat.com Subject: Re: [PATCH 5/5] watchdog: do not unpark threads in watchdog_park_threads() on error Message-ID: <20150929064151.GK25024@atomlin.usersys.redhat.com> References: <1443473052-3053-1-git-send-email-uobergfe@redhat.com> <1443473052-3053-6-git-send-email-uobergfe@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v2Uk6McLiE8OV1El" Content-Disposition: inline In-Reply-To: <1443473052-3053-6-git-send-email-uobergfe@redhat.com> X-PGP-Key: http://pgp.mit.edu/pks/lookup?search=atomlin%40redhat.com X-PGP-Fingerprint: 7906 84EB FA8A 9638 8D1E 6E9B E2DE 9658 19CC 77D6 User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --v2Uk6McLiE8OV1El Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2015-09-28 22:44 +0200, Ulrich Obergfell wrote: > If kthread_park() returns an error, watchdog_park_threads() should not > blindly 'roll back' the already parked threads to the unparked state. > Instead leave it up to the callers to handle such errors appropriately > in their context. For example, it is redundant to unpark the threads > if the lockup detectors will soon be disabled by the callers anyway. >=20 > Signed-off-by: Ulrich Obergfell > --- > kernel/watchdog.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) >=20 > diff --git a/kernel/watchdog.c b/kernel/watchdog.c > index 3bc22a9..af70bf2 100644 > --- a/kernel/watchdog.c > +++ b/kernel/watchdog.c > @@ -654,6 +654,12 @@ static struct smp_hotplug_thread watchdog_threads = =3D { > =20 > /* > * park all watchdog threads that are specified in 'watchdog_cpumask' > + * > + * This function returns an error if kthread_park() of a watchdog thread > + * fails. In this situation, the watchdog threads of some CPUs can alrea= dy > + * be parked and the watchdog threads of other CPUs can still be runnabl= e. > + * Callers are expected to handle this special condition as appropriate = in > + * their context. > */ > static int watchdog_park_threads(void) > { > @@ -665,10 +671,6 @@ static int watchdog_park_threads(void) > if (ret) > break; > } > - if (ret) { > - for_each_watchdog_cpu(cpu) > - kthread_unpark(per_cpu(softlockup_watchdog, cpu)); > - } > put_online_cpus(); > =20 > return ret; Reviewed-by: Aaron Tomlin --v2Uk6McLiE8OV1El Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWCjKvAAoJEOLellgZzHfWF7gP/ArUGCqNPIrp09E/trbBdXKy STfg7qsoilbGhtkjA33h3JN8HZ3vUZutBOr4SXjmgkbE0pqlYNNqRHuPXjmzMR3H cNlQcZGg+uM+R+lT6cLe7Ua7eZ2Ji9K6Ejv9qQ2dW4v1t8YGSgNz7AsQMKlKBEq5 H8vgWXAs073iMdhk+P6vp2wPRriajXNh/ngQdl93h8m2zn8Pw8ijloyVXTEp7Iy/ P1lfRDdQ3QTozc4NNq3LneBggTclsugB8dkbU6Rya7q0UJvMmArocnK6gPI/B7Ua UIbqOMAxHCSXbnp5pamuZu46ELKMaeHBsGQgXIC7yizLHf+SYVs5tWV+MaleUhsX t8pOAmoqpjJ26GdbmbvGdAYClRK8WXSCRcQ9Wh0BFuKYnyF7HF/WEu+wJovVPLeF KnFTBtciqeyGzq7HvydXjA87PcipAZheiWHaEIEH60lld64I2TTD12P6Na2vSgYA KWTJu3FPh+lCQePsGDcXnStxpf08mzGskJogCUS9obd0WuQMIsM5ZLDQrx97Zqpr Zo/oPv2mm+U8fKXDik7gPyb2jDTAT5oNijPgm/Ox3DEnw/N6wS98qng1pQPRxLKY Qxa+wb4j1VITpvqkty8boWZgBCl3vGElrtMLQMWFaA3GTgxa5i3jLXNtBAWekD8i CoSee/tWESrAzbNR9ru+ =fwYd -----END PGP SIGNATURE----- --v2Uk6McLiE8OV1El--