Received: by 10.223.185.116 with SMTP id b49csp8269675wrg; Thu, 1 Mar 2018 21:37:18 -0800 (PST) X-Google-Smtp-Source: AG47ELsurnWfSD0D64Io2nZPQjfifrFMXP3e9UQsHAvl+g7W6eizXiPMRHwJXEediotOsX4yR/2Z X-Received: by 10.99.173.79 with SMTP id y15mr3621210pgo.136.1519969038385; Thu, 01 Mar 2018 21:37:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519969038; cv=none; d=google.com; s=arc-20160816; b=rOrdObzMv0icJKYvl0fbsybLl1qlYfeIml5ZQvtYU8hEaKCdxL2JuPZjyufRzOiM9o 7xwZbfgnE8C9au2E9xoUfGKm11tpUVtCLwEZS93ZVm4QYbQ6D3Y1tBiX5ztzmw/tvvQ1 kIURisIUj+tEqLaXRNrY9ydTiF9WFMYlkJ3eCaX5404d8Jqa6UKtwS0m1n4j/QAuxN3n vYm4DPvJg7t3n2A0nMLBKnrL5Vx+q+Ss/g50L1e83WFmwY6WjCzqpVqGoB0qOEhYgYNs hyEIO+1hActCJXCUdgHXV56aKsYPQVghmVvNp+aGDv5WsMZDFh7FjW82cfgvbHH/rPD0 6Quw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=AU0wQ7WZSWhyrIQKbsfQ4EIztwe2IQXpinvfM546jy0=; b=m1wtRGE/tfvCiElD03/hk7s+OtOeiZEorTrtNGyWSySa40Q7nd1CU+fJ8qnyQ3XRv8 Xx7GTAJ+naSBuoOtmqxCKKujUwpisOBfppwu9Z0snAIh+3F5x6w4FTxnhtBhtXFZN1YN JSamdO38eiSYTAkR3UXVOP6gfOo92X1TcsaMT2QBnXztGEa8CLMNW4jjk3gis8DQj3m2 7WBwlb2jCzAItgZ0M56C+NEpXoIYY322sEp98rjd33OEw4gky7bOMTgLNa0fFWqAvt2s 9uLcx8PWJsbiMYJVZSEhzrWAoiEJjR3XwREWlLWsEqg31sdHgmF5aGMLD/0aouCUIvWf 8TGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jYydFT6l; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o4-v6si4273807plk.582.2018.03.01.21.36.58; Thu, 01 Mar 2018 21:37:18 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jYydFT6l; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165018AbeCBE42 (ORCPT + 99 others); Thu, 1 Mar 2018 23:56:28 -0500 Received: from mail-it0-f50.google.com ([209.85.214.50]:35246 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164400AbeCBE41 (ORCPT ); Thu, 1 Mar 2018 23:56:27 -0500 Received: by mail-it0-f50.google.com with SMTP id v194so686805itb.0; Thu, 01 Mar 2018 20:56:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AU0wQ7WZSWhyrIQKbsfQ4EIztwe2IQXpinvfM546jy0=; b=jYydFT6lAD+W+9dn17aGG2PaRlO+n5WZ6+Cs4Kk/oxr9O9zsHYh9lgIsLbnnJMNo7S /cM4zvpNQyV/Sf3vwtMgIHReJDxJbq9Gt6OIdJ0DKAhdQfNTb8Cpt7W3hvZx0J0gy4Zi cOmXhNWTUlGlHSalQF/J0DvGGSrF0Mq02U5kbb7m0VV63/exmtHAf3cAjD4MEom4MJdQ NGisxqxdka/erJtWC8eVQ/d0H66U1MusTxutUbs+I7Pe7CLjcrjtvEf4S+thArIKNjdt iaOBieFK1qMUSFdbVPNl+7O/7GEF6+WwXHvv+qYXhp16flPnXDIwTPpdJCI5jpMTfElw gl1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AU0wQ7WZSWhyrIQKbsfQ4EIztwe2IQXpinvfM546jy0=; b=EtloYcaFb2jJNd2aDbLNtlh9H/FuLW7vt6im8OylsJ/q5sqoD7eXGAq2agPUTyPuuf okozB4ilIn8iqXn+4CxIbHHieERDDZY1LwDaqwK9Z6s0AvuXrFYaAaGBpTREzW3q+Bga 28aVO7Wpl/ll6nyREGATfRMwSQu4oPn6/OuCDsSLk4HAixuV2wB7lZCZtlltum9rTDs0 NautajAmmv0K9ycITyfMKGk5nAprkgcE+wYNRbKDDQqR+vi/lXXM2avHUKDYwdKZSpf+ XePLKblVSgGieLlpmtH+FL3Ue5zSEsLda1ad1F1pPzvd7AvzahaODTZ2xcrcUtaC/rvM 4nLA== X-Gm-Message-State: AElRT7H1pNyFNt/ulpmFAKBRPFVxjHz9dw32VVp9ZhdpzB2hsmP866YP R6ayeG4+nBP/6m+TBu7MCY49ECe5p2lungAJbLk= X-Received: by 10.36.4.82 with SMTP id 79mr887539itb.22.1519966586555; Thu, 01 Mar 2018 20:56:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.59.71 with HTTP; Thu, 1 Mar 2018 20:56:26 -0800 (PST) In-Reply-To: <1519945861.2675.9.camel@sandisk.com> References: <1496655478-4039-1-git-send-email-opensource.ganesh@gmail.com> <1519945861.2675.9.camel@sandisk.com> From: Ganesh Mahendran Date: Fri, 2 Mar 2018 12:56:26 +0800 Message-ID: Subject: Re: [PATCH] scsi_lib: increase {host|target|device}_busy count after dispatch cmd To: Bart Van Assche Cc: "jejb@linux.vnet.ibm.com" , "hch@lst.de" , "martin.petersen@oracle.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Bart: 2018-03-02 7:11 GMT+08:00 Bart Van Assche : > On Mon, 2017-06-05 at 17:37 +0800, Ganesh Mahendran wrote: >> In android system, when there are lots of threads running. Thread A >> holding *host_busy* count is easily to be preempted, and if at the >> same time, thread B set *host_blocked*, then all other threads will >> be io blocked. > > Hello Ganesh, > > Have you considered to insert preempt_disable() and preempt_enable() calls > where necessary to achieve the same effect? I think that would result in a > much less intrusive patch. Yes, preempt_disable()preempt_enable will also achieve the same effect. But I just think preempt_disable()preempt_enable may be a little heavy for this problem which can be fixed by increaseing {host|target|device}_busy count after dispatch cmd. Thanks. > > Thanks, > > Bart. > >