From owner-freebsd-hackers@freebsd.org Wed Feb 19 08:22:32 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52D2A252C41; Wed, 19 Feb 2020 08:22:32 +0000 (UTC) (envelope-from babupalit@gmail.com) Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48MrLZ5qXYz4RNw; Wed, 19 Feb 2020 08:22:30 +0000 (UTC) (envelope-from babupalit@gmail.com) Received: by mail-oi1-x229.google.com with SMTP id q84so23017402oic.4; Wed, 19 Feb 2020 00:22:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=4J3GeLY3nbFQj1QR48LzVMbrsfkFteeIrBeO23XvwXg=; b=LXlc6E32KIvten3dGRz5a+ohXHhrCj6/JEQSr6Jcr96WAnPVehMBKiJ3P4DERVzKIG QZ8fkJuIo87mS3FAcunux+uscC5W2cejp2zGUzrk2CrkJ1H0a6nV9LTL2R17M7v1Hl6y 4DGfJdaZFxFEn/19rCdgC4HGMrOl+X5iA2XejMI7rqvte6Mh9R4Evb32+81Cks1uDDhN 1HgsWNdXIIhVTToXyyF2N4R9J8q4QKIHOMBCgSZOC5NyAFqhelkno+H1Xs+j5/eXxwiV eKrqenu9mE4zr/Km5jzCD68E/hCjAchCImcdIjtAdENW93m+ouNsJftVHEWt/qLebbMv Rm1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4J3GeLY3nbFQj1QR48LzVMbrsfkFteeIrBeO23XvwXg=; b=n6tILMGoKCXIgfl1lMt13dn5qh2mDegD3ovhWY0x9Uu+Pl2eJ/iIY8zExIIeyBb2VL 3TsxqZrw2/csA85BR0huJmnpeSqV/My7kNbuJ0XLemKgirZiZNjdG/84I4GU0clmkynC GW5dEGoV3+HWjBn98wzaaaskgXVLK1lAzyLfCsYnuir7rxVNGl2vOm2MoG1mr7/dkc3r QMpm6HQ/GGTh/ptvzPNtb8MvLDBjalXRZ9B9Sbo/Pm9yHylnWT+UnR5xA1JqWMd1Q9WA I9UKgh5+u19G+PM0Vn5IfpD2jCIdgtiLF5urvY33XAHpklUtnDWsfeMduXZkDNSI9RP7 RmCw== X-Gm-Message-State: APjAAAXJdMZyM+oa1pqKjc7I8gmDHD0sCVwoXLGBi/1os4kqfOqqw4R8 XIaYe3GjdxMI2P7ekTfhc+o8UwcORXQ8mdt7Ud4ia+P5 X-Google-Smtp-Source: APXvYqxGRHkcA9SiXICrDljeNu3V26U3cqJvbxymXIK7jFYa9IJUjjRO2QimUUc7e/YOvc//zu0X1B1GGZX4IX74kxY= X-Received: by 2002:aca:814:: with SMTP id 20mr3942792oii.159.1582100549397; Wed, 19 Feb 2020 00:22:29 -0800 (PST) MIME-Version: 1.0 From: Arpan Palit Date: Wed, 19 Feb 2020 13:52:18 +0530 Message-ID: Subject: msleep_spin is failed to waken up even after wakeup routine is invoked for the same. To: freebsd-drivers@freebsd.org, freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org X-Rspamd-Queue-Id: 48MrLZ5qXYz4RNw X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=LXlc6E32; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of babupalit@gmail.com designates 2607:f8b0:4864:20::229 as permitted sender) smtp.mailfrom=babupalit@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(0.00)[ip: (-8.50), ipnet: 2607:f8b0::/32(-1.89), asn: 15169(-1.68), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[9.2.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2020 08:22:32 -0000 Hi, I am facing one issue where wakeup rountine call is unable to waken up a msleep_spin routine call with a timeout value of 10 Seconds. The real scenario is as follows: post a hardware command and sleep using msleep_spin routine till interrupt comes, After getting the interrupt waken up the sleeping process using wakeup_one/wakeup routine call. As there are more than 2048 command and 16 parallel threads are running, observed randomly *one or two of the posted command* is *timing out* for which the *interrupt has came and also wakeup routine is invoked *after getting the interrupt for the same command. Note: *The issue is not seen when number of commands are less than 2048 with timeout of 10 seconds. *The issue can be seen with less number of commands also when timeout value 1 second. Can anyone please provide me an optimized way to schedule the process or a better way to do the scheduling. Thanks, Arpan Palit