Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3332511pxv; Mon, 28 Jun 2021 02:09:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXoAnAyKcaQEaz+y4OnE8UEui6jQ2fqoeadNI/pfuU1ksJNDyauAVTA9+ggZ+4azHDY+E3 X-Received: by 2002:a05:6638:3896:: with SMTP id b22mr22173897jav.37.1624871350305; Mon, 28 Jun 2021 02:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624871350; cv=none; d=google.com; s=arc-20160816; b=ZDE1uKiWB7222vx8TUdTg46I3FMH32xYfyd2Tr2E111RhwZFgWlg7lC5fFk1zbFvYw uct+r6Hrot8AVpG/4ie5/SLCPQKZZMpre9PbDZMB/XeC3N512k+vf4vgI4PlKCSSek52 ndqIG7x/oZ6xZ9aCtEd2KRhxGYVEYfoB0WvASkSozfgB0nZyzOt+mmzENOD9off+69mX f72pQ1ML7kxdoixGLBoTYkVvibR+2lJwzT6x53mDCmBuZVgbwpsq9MCx2/kTIb+ao8yi kevKM7EMlLk1qTF/pqcdzgM7kvEBjlFMhwqUI2Vms4GYYTWKrJjpBhKb3lCfYF5lwIcM PlSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=AVHhNegxR+QaaPY+dCc0FenzT0BMI1B1cwtcPQOsEJY=; b=h42/uYFLHDFVD4rlklYVzW+ffNRpqr26/SmTeHSV3NfvaCXD/RinqKPOd4bQENBBtZ kPCEOcxBrGsZ+LgSdIb9GTKSMbRSiy99FJfIitxFiLybgp8qIkXLuuvSfhakzXCYn+sV W6oKYZjZfxpkuB9lJYake049M6fjHXK5etLwi6V3ofve+P6FDr7pV6Ck5oRYs4O5F9ju tXxX7uZhjEHO4gBb3FcSkFBXNn0lQSCtV2VJVKik8Fbw5DGViUOcOnOSQEh141O4DeST 2bd4napGyzgmVzzTzkjXPyTW2SCWhOVr8i7ChzQc9GeYsyfHgh2x83XZGxT7L5KHwX2I kM3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QV+xUkDb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=j3e6mgXm; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QV+xUkDb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si4232187ilt.85.2021.06.28.02.08.57; Mon, 28 Jun 2021 02:09:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QV+xUkDb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=j3e6mgXm; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QV+xUkDb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232415AbhF1JJb (ORCPT + 99 others); Mon, 28 Jun 2021 05:09:31 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:57066 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232284AbhF1JJa (ORCPT ); Mon, 28 Jun 2021 05:09:30 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 58ABB20239; Mon, 28 Jun 2021 09:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624871224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AVHhNegxR+QaaPY+dCc0FenzT0BMI1B1cwtcPQOsEJY=; b=QV+xUkDbcbPVWkGQrNuq6S9nSE5cvtqme9uID4htnkkFs3qhWW0GsCqmbH2X0S3nvcz/+U GkdMarReT1zJNf9dcutm3RtPvPhBhS04eJpYViBs7F3LHPvaLW3VvHPBDpImox1Dk8VE/y bErKFV4FeXNnf6BGxHTo/j70q6yxLiQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624871224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AVHhNegxR+QaaPY+dCc0FenzT0BMI1B1cwtcPQOsEJY=; b=j3e6mgXm0IQOmhROuqu5HnO9ScuKHK0s+R0VISejt+twGaoydqdqRgPI7k3hg00gy4Rx76 YL8GW4OO6ysJtWBw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 3E39C118DD; Mon, 28 Jun 2021 09:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624871224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AVHhNegxR+QaaPY+dCc0FenzT0BMI1B1cwtcPQOsEJY=; b=QV+xUkDbcbPVWkGQrNuq6S9nSE5cvtqme9uID4htnkkFs3qhWW0GsCqmbH2X0S3nvcz/+U GkdMarReT1zJNf9dcutm3RtPvPhBhS04eJpYViBs7F3LHPvaLW3VvHPBDpImox1Dk8VE/y bErKFV4FeXNnf6BGxHTo/j70q6yxLiQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624871224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AVHhNegxR+QaaPY+dCc0FenzT0BMI1B1cwtcPQOsEJY=; b=j3e6mgXm0IQOmhROuqu5HnO9ScuKHK0s+R0VISejt+twGaoydqdqRgPI7k3hg00gy4Rx76 YL8GW4OO6ysJtWBw== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id VJoMDjiR2WAcUAAALh3uQQ (envelope-from ); Mon, 28 Jun 2021 09:07:04 +0000 Date: Mon, 28 Jun 2021 11:07:03 +0200 From: Daniel Wagner To: wenxiong@linux.vnet.ibm.com Cc: ming.lei@redhat.com, linux-kernel@vger.kernel.org, james.smart@broadcom.com, wenxiong@us.ibm.com Subject: Re: [PATCH 1/1] block: System crashes when cpu hotplug + bouncing port Message-ID: <20210628090703.apaowrsazl53lza4@beryllium.lan> References: <1624850072-17776-1-git-send-email-wenxiong@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1624850072-17776-1-git-send-email-wenxiong@linux.vnet.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wen, On Sun, Jun 27, 2021 at 10:14:32PM -0500, wenxiong@linux.vnet.ibm.com wrote: > @@ -468,8 +467,7 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q, > data.hctx = q->queue_hw_ctx[hctx_idx]; > if (!blk_mq_hw_queue_mapped(data.hctx)) > goto out_queue_exit; > - cpu = cpumask_first_and(data.hctx->cpumask, cpu_online_mask); > - data.ctx = __blk_mq_get_ctx(q, cpu); > + data.ctx = __blk_mq_get_ctx(q, hctx_idx); hctx_idx is just an index, not a CPU id. In this scenario, the hctx_idx used to lookup the context happens to be valid. I am still a bit confused why [1] doesn't work for this scenario. As Ming pointed out in [2] we need to update cpumask for CPU hotplug events. Thanks, Daniel [1] https://lore.kernel.org/linux-block/20210608183339.70609-1-dwagner@suse.de/ [2] https://lore.kernel.org/linux-nvme/YNXTaUMAFCA84jfZ@T590/