Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp229176imm; Thu, 11 Oct 2018 19:18:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV61cto1Kfkva5n/mhUPLoKQ7Gx5uOgLGPGoKi7Q8kaJnABtPvQ26RziNwoZp89YbbEuhCagD X-Received: by 2002:a63:d10b:: with SMTP id k11-v6mr3770110pgg.80.1539310719128; Thu, 11 Oct 2018 19:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539310719; cv=none; d=google.com; s=arc-20160816; b=xJabZ6LUiSr23VkVfIijHLBDPmaRGCGCYbhEsMnewDEcRI7ibeekRTi+rRFaS5Q1dR BuGgCsqVCLAdWGQ9esYUhySsUo+9Z6R85s/aQZwGuV/uO/hEpX7US1t6ONCrJBgXLoBc fi7iR3qOgOjevnZ/6vU1giJ9lrlv4FdbSds+lCn5UD4Q7OHi8EzntOeffwbWAiLGXQMJ crVn95UgH017S83cyhmbjgTDUXl6LBmlOAgWM7LAyxaIZxO3H+gEyIeSv0Mud4zMYdo6 R3TLfUZCNdPB+ImUv/bC9/oM37iLt933NZkvZW8vlpIF7aC7SWD+5sMaVowxGEHg0t2U CmRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=jvihXHv05MFy2mCQqpPYSRu+gKBsljuKMX5ryrCl8ag=; b=0qBVUWmRZ72L2MIZtUnl4L3EYJTyfxsU09kMmHSyva+aEWgmuZFi/Ugm7iqCPGVKb6 ilNLspDdl7O+619fuuzqEW3nFzcnr+BXyuVO8nqifEKXa4eDFwpil92MP9b4bh0qoZ1z F6AAoksTPVdHDEqe0UjdOrGo4xMwxKyTPo22QKZnic8jfEBvys1MuMmG1vNa5NXwjfhb vB++7g1qNs42atxncw3nZ8NJ3LIXGkLXQmfnGzkWYnvb/UCg/tyK7YM7DmIS/mgyBjAo AjqRiEuqphI8iCEaIcgbEf9NHEZI1VXZZ1jIhIIeLYoCTO9iToXUj82EFVX1ZsmShl51 25Ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s26-v6si30664691pfj.226.2018.10.11.19.18.24; Thu, 11 Oct 2018 19:18:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbeJLJsI (ORCPT + 99 others); Fri, 12 Oct 2018 05:48:08 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45169 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbeJLJsH (ORCPT ); Fri, 12 Oct 2018 05:48:07 -0400 Received: by mail-pl1-f194.google.com with SMTP id y15-v6so5120854plr.12; Thu, 11 Oct 2018 19:18:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jvihXHv05MFy2mCQqpPYSRu+gKBsljuKMX5ryrCl8ag=; b=gOf6XhSpWMjHYUTMPUU04RV0yTwJ2kzFmWS1PwOKj1MpH4Gqzs3z1DbjsHgtDlwt+F 7RRy31f0Qjng239509IEQNx6LVOPuyU8eeF7Yy9dcshwND/aGiUQejllOkBNOXIKfDZx 7b8oAXYL7QCljxqcqKthIb4ynSZFh+UNShbaCDuma4g5J2LLDd9y7dCeAIYArDMcm73Y rIwTh0du190HaRnBRu2ndDBfjQ6cKjbKQV6KoFHMR8S8Q0vFpU5SY0RakgExeFCQOfTO D8nj5USXsNlqyLF3OfRKa8n+UlLaVJLMhHK4p7zZdCY4DcYJoLu0EnYqFFGiQojxsL67 Xh4Q== X-Gm-Message-State: ABuFfoh12YQ/H3UduuLuHupUhepCOEOceOV84QbxTBfD3fLGd/x0SrTb F1uZ//+E3gKHlUG6stzMM3E= X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr4011881pla.131.1539310683830; Thu, 11 Oct 2018 19:18:03 -0700 (PDT) Received: from asus.site ([2601:647:4601:42b4:3842:3e31:3bb6:cf62]) by smtp.gmail.com with ESMTPSA id g5-v6sm21477217pfb.130.2018.10.11.19.18.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 19:18:03 -0700 (PDT) Subject: Re: [PATCH 1/2] sched/wait: Add wait_event_lock_irq_timeout for TASK_UNINTERRUPTIBLE usage To: "Nicholas A. Bellinger" , target-devel Cc: linux-scsi , lkml , "Martin K. Petersen" , Mike Christie , Hannes Reinecke , Christoph Hellwig , Sagi Grimberg , "Bryant G. Ly" , "Peter Zijlstra (Intel)" References: <1539141790-13557-1-git-send-email-nab@linux-iscsi.org> <1539141790-13557-2-git-send-email-nab@linux-iscsi.org> From: Bart Van Assche Message-ID: <91f50300-5e36-73a5-379d-9c82004947bb@acm.org> Date: Thu, 11 Oct 2018 19:18:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <1539141790-13557-2-git-send-email-nab@linux-iscsi.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/9/18 8:23 PM, Nicholas A. Bellinger wrote: > Short of reverting commit 00d909a107 for v4.19, target-core needs a > wait_event_t marco can be executed using TASK_UNINTERRUPTIBLE to > function correctly with existing fabric drivers that expect to run > with signals pending during session shutdown and active se_cmd I/O > quiesce. > > The most notable is iscsi-target/iser-target, while ibmvscsi_tgt invokes > session shutdown logic from userspace via configfs attribute that could > also potentially have signals pending. > > So go ahead and introduce wait_event_lock_irq_timeout() to achieve this, > and update + rename __wait_event_lock_irq_timeout() to make it accept > 'state' as a parameter. > > Fixes: 00d909a107 ("scsi: target: Make the session shutdown code also wait for commands that are being aborted") > Cc: Bart Van Assche > Cc: Mike Christie > Cc: Hannes Reinecke > Cc: Christoph Hellwig > Cc: Sagi Grimberg > Cc: Bryant G. Ly > Cc: Peter Zijlstra (Intel) > Tested-by: Nicholas Bellinger > Signed-off-by: Nicholas Bellinger Reviewed-by: Bart Van Assche