From patchwork Thu May 9 14:31:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 10937233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CDB11390 for ; Thu, 9 May 2019 14:32:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85B9428BCA for ; Thu, 9 May 2019 14:32:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82DF428BBB; Thu, 9 May 2019 14:32:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EAF2328B3E for ; Thu, 9 May 2019 14:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6sGQrMfl+TkIJp9cYmmMWfI8mv/XK0w5saXncFbU7mo=; b=LSMSSTvkgRSGPr MikV3DjcDtR0OMRmbOIo9HgHQQI6VauniqW/sb4oeZFY6EYnUG8nTyuwiPn9Vy/TkPwi8JFfSkWQF qcAooI85KBMGGHei9Gu1W873NY4zgNbKNY+SoMJuS5H+3tpAP/PyRe8vbYNfTv/BUxVLi0Qrv+LmN 8dCwe6yjd+Bnpz/jLwrGryPhizPQSnuwXKjhMWf/PZxE7M4ULze3Mn8qiqWyPeNeRVMHYXYw970Li /nUWIL/JPPG6jFoaSIuxOslWIAljiIa2WrMOYto3y1urVy9EH3lWxBCmJLfNExo4K75evNNMLgQFg 0I/F0CthrKUkWMxQXdjA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOk5b-0005rj-3G; Thu, 09 May 2019 14:32:03 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOk5P-0005fu-QC; Thu, 09 May 2019 14:31:53 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E498EABD4; Thu, 9 May 2019 14:31:49 +0000 (UTC) From: Nicolas Saenz Julienne To: linux-kernel@vger.kernel.org Subject: [PATCH v3 0/4] staging: vchiq: use interruptible waits Date: Thu, 9 May 2019 16:31:32 +0200 Message-Id: <20190509143137.31254-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190509_073151_996826_5B48BB0C X-CRM114-Status: GOOD ( 13.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stefan.wahren@i2se.com, devel@driverdev.osuosl.org, Nicolas Saenz Julienne , dan.carpenter@oracle.com, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, this series tries to address an issue that came up in Raspbian's kernel tree [1] and upstream distros [2][3]. We adopted some changes that moved wait calls from a custom implementation to the more standard killable family of functions. Users complained that all the VCHIQ threads showed up in D state (which is the expected behaviour). The custom implementation we deleted tried to mimic the killable family of functions, yet accepted more signals than the later; SIGKILL | SIGINT | SIGQUIT | SIGTRAP | SIGSTOP | SIGCONT for the custom implementation as opposed to plain old SIGKILL. Raspbian maintainers decided roll back some of those changes and leave the wait functions as interruptible. Hence creating some divergence between both trees. One could argue that not liking having the threads stuck in D state is not really a software issue. It's more a cosmetic thing that can scare people when they look at "uptime". On the other hand, if we are ever to unstage this driver, we'd really need a proper justification for using the killable family of functions. Which I think it's not really clear at the moment. As Raspbian's kernel has been working for a while with interruptible waits I propose we follow through. If needed we can always go back to killable. But at least we'll have a proper understanding on the actual needs. In the end the driver is in staging, and the potential for errors small. The first 3 commits fix the issue, and should probably get in as soon as possible, the last commit is just cosmetic and can wait until 5.3. Regards, Nicolas [1] https://github.com/raspberrypi/linux/issues/2881 [2] https://archlinuxarm.org/forum/viewtopic.php?f=65&t=13485 [3] https://lists.fedoraproject.org/archives/list/arm@lists.fedoraproject.org/message/GBXGJ7DOV5CQQXFPOZCXTRD6W4BEPT4Q/ --- Changes since v2: - Cleaned up revert commit message - Rebase & merge conflict resolutions - Add code cleanup suggested by Dan Carpenter Changes since v1: - Proplery format revert commits - Add code comment to remind of this issue - Add Fixes tags Nicolas Saenz Julienne (4): staging: vchiq_2835_arm: revert "quit using custom down_interruptible()" staging: vchiq: revert "switch to wait_for_completion_killable" staging: vchiq: make wait events interruptible staging: vchiq: stop explicitly comparing with zero to catch errors .../bcm2835-camera/bcm2835-camera.c | 11 ++- .../interface/vchiq_arm/vchiq_2835_arm.c | 2 +- .../interface/vchiq_arm/vchiq_arm.c | 85 +++++++++---------- .../interface/vchiq_arm/vchiq_connected.c | 4 +- .../interface/vchiq_arm/vchiq_core.c | 53 +++++++----- .../interface/vchiq_arm/vchiq_debugfs.c | 4 +- .../interface/vchiq_arm/vchiq_util.c | 6 +- 7 files changed, 82 insertions(+), 83 deletions(-)