Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2204485imm; Wed, 16 May 2018 09:22:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqL3gv3ffMPvAIeqlJd8HrMQxpb3vJbyP81jRKIeHmZPvNDWCOlQHpbi5ux5Ioh6eLyAFFD X-Received: by 2002:a62:3bcb:: with SMTP id w72-v6mr1599866pfj.129.1526487744197; Wed, 16 May 2018 09:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526487744; cv=none; d=google.com; s=arc-20160816; b=og306dGOL5n09aGmig5V1/oFVo14Ny2RXuOZKV7hs16SEnIAHFQpEF6jPMq0LPuES+ h6RqwjQgfj0sMhm6910lm3LAESAX7XoBuKFcDinSeMcW9/1JiGUwH76lBC9HqzzLNg9N 3sKR06NCzb5NPi27XrIBGkH4fWP4QFTm5fMADLLKqJLF7lKbZ7FOkbjtRH48Ik3sfWT7 dd7psoDyy3UZ4QSv4Ehy65dzBiRlVDLRjXYLVnReSNApB4K2HjwIhSOBQIKsEZyVz1gz dhZcFV3LiRBdjIRH8J1QiVn8/42UgmQNx8MmH+N5aqs9Z/RT7lsw6IMZ0Fhv7FqD9AuV H4hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=zgB92Kw6HcYr4EWkPsWiL2UtnUiPxbYq6tHE2Sbf6Ys=; b=acpZMJjsgue2chQxThK2t55vTZ8UMQopTkpZmkh7DlYHpedYbOOS7ZQw1ZKOo6ig5W jI2rf/QURjdtpc+FjQUoGCXFcZ0wOrmWB7BmQw98L4YWXm8Y4OfbeKu11LDNdeH6bPJp IzJ/JDJYLBQI+1JbvnRvDt2EghRiADlIRc1VfwQmriIQpjvTS81P7oGG6cG43/vJ0ZsI T90wxPEtBaXkYLasKeLHtJKlEpO72LScDett+aRdGpf/EQtj/4ijHfOBSS77rSOUYn5C LCGjUVM+QhO0DB6KXdHJfisghdRGa6xHSwtubvUWHX79hiAYcTymyGpFsK4BQNCBEO5b urpA== 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 u7-v6si2973516plq.160.2018.05.16.09.22.09; Wed, 16 May 2018 09:22:24 -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 S1752304AbeEPQUK (ORCPT + 99 others); Wed, 16 May 2018 12:20:10 -0400 Received: from verein.lst.de ([213.95.11.211]:48468 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751153AbeEPQUJ (ORCPT ); Wed, 16 May 2018 12:20:09 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id DAC6067318; Wed, 16 May 2018 18:24:32 +0200 (CEST) Date: Wed, 16 May 2018 18:24:32 +0200 From: "hch@lst.de" To: Bart Van Assche Cc: "hch@lst.de" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "israelr@mellanox.com" , "sagi@grimberg.me" , "sebott@linux.ibm.com" , "ming.lei@redhat.com" , "axboe@kernel.dk" , "jianchao.w.wang@oracle.com" , "maxg@mellanox.com" , "tj@kernel.org" Subject: Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again Message-ID: <20180516162432.GA4398@lst.de> References: <20180515225124.20428-1-bart.vanassche@wdc.com> <20180515225124.20428-6-bart.vanassche@wdc.com> <20180516125110.GA32078@lst.de> <8058d72fef475caffa78c962bc4220f5f8fa3dde.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8058d72fef475caffa78c962bc4220f5f8fa3dde.camel@wdc.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 16, 2018 at 04:17:42PM +0000, Bart Van Assche wrote: > There is another reason the deadline is included in the atomic operation, > namely to handle races between the BLK_EH_RESET_TIMER case in blk_mq_rq_timed_out() > and blk_mq_complete_request(). I don't think that race is addressed properly by > your patch. I will see what I can do to address that race without using 64-bit > atomic operations. I might be missing something here, so please help me understand what is missing. If we restart the timer in blk_mq_rq_timed_out we also bump the generation at the same time as we reset the deadline in your old patch. With this patch we only bump the generation, but that should be enough to address the rest, or not?