From owner-svn-src-head@freebsd.org Fri Aug 28 09:26:44 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 014FF9C3F11 for ; Fri, 28 Aug 2015 09:26:44 +0000 (UTC) (envelope-from julien@jch.io) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1C6E2BF for ; Fri, 28 Aug 2015 09:26:43 +0000 (UTC) (envelope-from julien@jch.io) Received: by qkfh127 with SMTP id h127so2423544qkf.2 for ; Fri, 28 Aug 2015 02:26:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=aGyAnI41FwfL3Awd0HWSeVJHePlyilYeY9maJKnIC2M=; b=XswTKCaO3MuE7pB150spgahMK/f1xFVtLud6J+W1+UVxLDc1V6z0B0/82IIM4Ewvl8 Vg52bt6E1C5BM2GsE+OdiCG6N/Ic+sXKRUm1ZWmNpLYGJ/vqMYIsCOdxg6DroaiWFrDL cFeoJng7yJU1pNZpDbhnTmTQhgJEACnEc1lh87t3dAxPSuM4Ndmn5N3irGv+Wu3WePZG NtvyAQDpUmBeMlnPcaybFl1DS5goziE5AB/rsdck0AaCoPVq/RVXEtdZYtzi2S/mKm5H yTkSOjztvtNhlwmIWBMdvpL5ZAgt8J39Mzw+TtHQXm/HfspmQZd00efqlMkaKTL75bSc o4Zw== X-Gm-Message-State: ALoCoQkWjwx6WFHkbDrPPoWf9Y3ye0+QPme8R+qMeZmbskJPaD26f44MGdSJONAwIqAfJKqw7EgO X-Received: by 10.55.25.94 with SMTP id k91mr13380767qkh.51.1440752926387; Fri, 28 Aug 2015 02:08:46 -0700 (PDT) Received: from res1tvegesna-l2.vcorp.ad.vrsn.com (h87.s239.verisign.com. [216.168.239.87]) by smtp.googlemail.com with ESMTPSA id t23sm2986972qkt.18.2015.08.28.02.08.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2015 02:08:45 -0700 (PDT) Subject: Re: svn commit: r286880 - head/sys/kern To: Konstantin Belousov References: <201508181015.t7IAFAex055889@repo.freebsd.org> <55DD69E5.4090904@selasky.org> <55DD74EB.30601@selasky.org> <55DE01F7.8040508@freebsd.org> <20150827104946.GH2072@kib.kiev.ua> <55DF3A93.8080507@freebsd.org> <20150827171918.GM2072@kib.kiev.ua> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin From: Julien Charbon X-Enigmail-Draft-Status: N1110 Message-ID: <55E02515.1010705@freebsd.org> Date: Fri, 28 Aug 2015 11:08:37 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150827171918.GM2072@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gVdgJKUhUhxHTrEfWuBxdan5WD5HD4iKr" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2015 09:26:44 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gVdgJKUhUhxHTrEfWuBxdan5WD5HD4iKr Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Konstantin, On 27/08/15 19:19, Konstantin Belousov wrote: > On Thu, Aug 27, 2015 at 06:28:03PM +0200, Julien Charbon wrote: >> On 27/08/15 12:49, Konstantin Belousov wrote: >>> On Wed, Aug 26, 2015 at 08:14:15PM +0200, Julien Charbon wrote: >>>> As I said, I am not opposed to back out this change, callout(9) API= in >>>> mpsafe mode is a already complex/subtle API, it won't change too muc= h >>>> the current complexity. >>>> >>>> Let say that if nobody screams until Friday 8/28, I will put back >>>> r284245 and revert this change _and_ I will make this case clear in = the >>>> man page. >>> >>> [Replying to a random message in the whole set of conversations] >>> >>> There is one more case, besides TCP timers, which is equially, of not= >>> more, critical and sensitive WRT to the callout_stop(). Look at the >>> sys/kern/subr_sleepqueue.c:sleepq_check_timeout(). Stray return of >>> the false result from callout_stop() causes creation of the non-killa= ble >>> processes: the callout fired, we missed the wakeup and went to sleep= >>> by manually doing the context switch. Such thread cannot be woken up= =2E >>> >>> I suspect that your fix is a better approach than my attempt to look >>> at something similar at PR 200992 (may be not). >> >> This change (r286880) won't improve the PR 200992: >> >> r286880 only addresses a case where callout_stop() returns 1 instead = of >> 0. Thus the only thing that can do r286880 to PR 200992: >> >> - Don't change anything the issues >> - Worsen the issue >> >> Sorry to kill your hope of a simple and elegant fix for PR 200992. >=20 > Well, not that I am frustrated much. Thank you for taking a look. > Did you read the patch attached to the PR ? Right, I read it from here: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D157915&action=3Ddif= f And I am not confident enough to say if it is the right way go. I became knowledgeable on callout calls from TCP timers (D2079 and D2763), but that's it. I would propose rrs (as he introduced the 'not_on_a_list' logic) and jhb for reviewing your patch. And unlike me (D3078), don't underestimate the callout complexity in mpsafe mode. :) -- Julien --gVdgJKUhUhxHTrEfWuBxdan5WD5HD4iKr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJV4CUaAAoJEKVlQ5Je6dhxT2oIANsQTSZddyiNnTKS3DOv0un+ QWtRcKQenHlqZratYMCqqpsrBTHFhe2Fsr9JaJBJr5FWOLeKSCbpkQEpMqaLak3U TeYLY4vZpF3R+Jk1KcJ/Ph8h7wQ+2thSvv9txuWPwsvQMJ+G91R5L5yny3SQq+Bx D82PgawpqjaqQLho50VFtDgyVrlLEv4up0wrRZFR/XL4h6lCWeVd4b4IjEnlXwvT L0C+ALo6ClVfbp6W0K5c+ODV7h+ePCWb+luj5MbU81LleNEsOh2EyToDNw2Z6d3i 9tA8beNcudbQ7Ogdvy8W/wgVt13wphH2a7mOyo1159aEoYDMQx6JUXhTRliQzsc= =142B -----END PGP SIGNATURE----- --gVdgJKUhUhxHTrEfWuBxdan5WD5HD4iKr--