Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1193557rwi; Wed, 19 Oct 2022 07:45:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4m0yBQ+rJdsAO5Z4wQrjFedpultWLwWwjqzibIA3rCbhATVmz5dDmpAUDFCua+I3us7MXS X-Received: by 2002:a17:907:96a3:b0:790:65a:3a0a with SMTP id hd35-20020a17090796a300b00790065a3a0amr7326875ejc.728.1666190709892; Wed, 19 Oct 2022 07:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666190709; cv=none; d=google.com; s=arc-20160816; b=uKcFo9QdoLVRvfkylUXn1ZwBEcRfjEmKBu24QEm+U3dPtuk3Tw2VbdvSDmvIYwQzWx cr5KKZogE3CGX+OLcojnJZeuhXRyNaS0gqhiStYHb60bV4mungoLj4/b5xtr3LB+iGKB 6vlJ41xHmUqPJczgGJa7YALlaC+9JEDhdOZP1LkO8If7zzk9s+O//2f+YCOIJwbopxuh QDmtgM8WDu5SZ21C5kciqLIPdkPyWl1RmFFEQ1fgRlghnV3UWu5k//naf2tOSYuaNNnx 8GIz862FB/JydM0r2Ys4otMKVWGl6VXtQGKqG1Ku4FaK6ZlEwWVslxbjOF1kgSQA2iv4 ScDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization:subject :from:cc:to:content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=JaTcT9qt+76Npk108NjvYgDarOfp8aE00pyDm8aEob0=; b=Qjl7/FsP52xXirUxhHLS2TOvJ3efN8xzSy5jcLGVHUQnQ1rJWKcJN7LToO2/uqQ6wx ga97xLFrSGICL8f/AVYyLAlrWC339dZZCNQsCdLz1cPRtMqcoJ2gIBpgt9cYyvKRcxkR 2ySwWBXKFp59ueOT7vT06vYy7dHiYMErLQEDnrQhg6hf1CvY2+HbaTdW2qlMKdFvTxP0 sMQwydlp73lM0Thvye7x6710eWGZfKv/vvgjWC+Ha+RB1eOuftZ1yxTT0h7ftS7fCiIb 3lCTMvYiCWpQ8z4cDE3LCIOvdISMW/JRX2QRWyYlzpWoDWAS8Z6BqOtdgy2ULfy+sijx LqTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ISaE+F6b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a05640208cf00b0045895823388si13037523edz.87.2022.10.19.07.44.41; Wed, 19 Oct 2022 07:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ISaE+F6b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233400AbiJSNqn (ORCPT + 99 others); Wed, 19 Oct 2022 09:46:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233095AbiJSNpb (ORCPT ); Wed, 19 Oct 2022 09:45:31 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D32B1D20EC for ; Wed, 19 Oct 2022 06:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666186308; x=1697722308; h=message-id:date:mime-version:to:cc:from:subject: content-transfer-encoding; bh=4wtOeT8RZIX6dw14IAJ0yPqq/FxpKzeHezEAY45EG/I=; b=ISaE+F6bi5RSfwgBEnN6ZFFNmwDLn0ee1s6pBQLzylyErAAwUw8w8lCy WkVDsu+z5jYAVpVxJgNxxS6PT9KpwNwe5WlaNizxNBXh7VCRq/XJIERrg yp3rEMaiZRVMQv6JfcQKHQgTq9hiDaQxL6ue6jYP8yWqQ1nkMgFYwgaPJ IYYsjgz9Jy8CKYTArJ8T/FLHEL4qtfixG9TIqfplddw8HUtKl5+IgErwP zm4oQarfNBLRR/c0S+q/nvvqha8VuFXaDyUQeId71cOMHFHo6CVVJyJ6i orUx8B9OxYTF1snP2e0Gb/jrQd5KpLpR5pzP7pd/mscgEAgfBMDnhTtf6 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="308095458" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="308095458" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 06:31:04 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="660348012" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="660348012" Received: from mjmcener-mobl1.amr.corp.intel.com (HELO [10.213.233.40]) ([10.213.233.40]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 06:31:03 -0700 Message-ID: <0029af41-bf24-9972-10ac-f52e1bdcbf08@linux.intel.com> Date: Wed, 19 Oct 2022 14:31:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Content-Language: en-US To: "Jason A. Donenfeld" , "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org, "Intel-gfx@lists.freedesktop.org" , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= From: Tvrtko Ursulin Subject: Re: signal: break out of wait loops on kthread_stop() Organization: Intel Corporation UK Plc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HK_RANDOM_ENVFROM,HK_RANDOM_FROM, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, A question regarding a7c01fa93aeb ("signal: break out of wait loops on kthread_stop()") if I may. We have a bunch code in i915, possibly limited to self tests (ie debug builds) but still important for our flows, which spawn kernel threads and exercises parts of the driver. Problem we are hitting with this patch is that code did not really need to be signal aware until now. Well to say that more accurately - we were able to test the code which is normally executed from userspace, so is signal aware, but not worry about -ERESTARTSYS or -EINTR within the test cases itself. For example threads which exercise an internal API for a while until the parent calls kthread_stop. Now those tests can hit unexpected errors. Question is how to best approach working around this change. It is of course technically possible to rework our code in more than one way, although with some cost and impact already felt due reduced pass rates in our automated test suites. Maybe an opt out kthread flag from this new behavior? Would that be acceptable as a quick fix? Or any other comments? Regards, Tvrtko