From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A9AAC433EF for ; Mon, 14 Mar 2022 17:40:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235546AbiCNRlT (ORCPT ); Mon, 14 Mar 2022 13:41:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235429AbiCNRlT (ORCPT ); Mon, 14 Mar 2022 13:41:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B8E0911A1E for ; Mon, 14 Mar 2022 10:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647279606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qLstmHH+5CbsnPnWXdtuRqA7kvqe8GYqa2Jz6JEJP/I=; b=GjFwHQUeiXHjTLTFZx946HloM9o1JjzXzhvF3CDTMwGyB0Jw9wDFZUE4rsvsQT71Josskk v3f3rVXbummErs0HFB84wVh81h5MbSz4JEHOMwEBwX2FpQ8fNdzzJrBEIDtQyLAthEy0pk QpEvaCKyQkstg7CMpCEDMlTU8Xfz/9M= Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-660-RLu-ESCXN9e9s26WbM7wOQ-1; Mon, 14 Mar 2022 13:40:05 -0400 X-MC-Unique: RLu-ESCXN9e9s26WbM7wOQ-1 Received: by mail-oo1-f72.google.com with SMTP id p1-20020a4adfc1000000b0031cfa60836dso13620281ood.19 for ; Mon, 14 Mar 2022 10:40:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=qLstmHH+5CbsnPnWXdtuRqA7kvqe8GYqa2Jz6JEJP/I=; b=6FZphgoRYXtaafpluREUO5gZPWG1GvGJNbLvwITzEPHRfoVX2p39AHwFzM8MXwx7DH xu98WjC/ngFe9Lln0rSK9NZ7sSa6nkBd34CjsRdnUteGVPH+tTl7DFGQ2r2mT/96koJ8 C30Mmx9HPOp7XOMvBD7Ep12mtkRUOo6yK9w4QjiOtSKLV6KaoZB+dqGJa8LtXw0m9NSO dVDrFnd+HBTNMZhVsRoVw7awCrXywxiJo6rqk1AmbkPi10gfW3ERY95W3PjBfWLR7KZu oB2IVXGVgOAdZpgHHpdetKG1/pEsk9N8i7YnfueiXXDrhO6a5Se/m0h3FlC75sHQBlH7 HIIg== X-Gm-Message-State: AOAM5305Movp25l5G0wMMhxP8jMZMMVSiejr2MZwu7KK2sPeCWEgWkck fyvnFCOO/4nH4fWz3tzkPhBpR8oPvmfqXxBv9zRN8DcrFyaXdaNbu1DAMFxJxHfqQ8w+gQ6Itbu s9iIZIomYiT0woADpE9yRn+6Y X-Received: by 2002:a05:6808:128e:b0:2da:6d08:8704 with SMTP id a14-20020a056808128e00b002da6d088704mr167346oiw.9.1647279604779; Mon, 14 Mar 2022 10:40:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvKon1rAQEfTVIuqF2qBmJjJWOza7UxNLEW6n8+Qxdxp8wU5eo0UPDzK9UYDBRVSRQoqbLBQ== X-Received: by 2002:a05:6808:128e:b0:2da:6d08:8704 with SMTP id a14-20020a056808128e00b002da6d088704mr167338oiw.9.1647279604475; Mon, 14 Mar 2022 10:40:04 -0700 (PDT) Received: from loberhel ([2600:6c64:4e7f:cee0:729d:61b6:700c:6b56]) by smtp.gmail.com with ESMTPSA id l84-20020aca3e57000000b002d97bda3872sm8132617oia.55.2022.03.14.10.40.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Mar 2022 10:40:03 -0700 (PDT) Message-ID: Subject: Re: [Patch 0/2] iscsit/isert deadlock prevention under heavy I/O From: Laurence Oberman To: David Jeffery , Max Gurtovoy Cc: linux-rdma@vger.kernel.org, target-devel@vger.kernel.org, Sagi Grimberg Date: Mon, 14 Mar 2022 13:40:02 -0400 In-Reply-To: References: <20220311175713.2344960-1-djeffery@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org On Mon, 2022-03-14 at 11:55 -0400, David Jeffery wrote: > On Mon, Mar 14, 2022 at 10:52 AM Max Gurtovoy > wrote: > > > > > > On 3/14/2022 3:57 PM, David Jeffery wrote: > > > On Sun, Mar 13, 2022 at 5:59 AM Max Gurtovoy < > > > mgurtovoy@nvidia.com> wrote: > > > > Hi David, > > > > > > > > thanks for the report. > > > > > > > > Please check how we fixed that in NVMf in Sagi's commit: > > > > > > > > nvmet-rdma: fix possible bogus dereference under heavy load > > > > (commit: > > > > 8407879c4e0d77) > > > > > > > > Maybe this can be done in isert and will solve this problem in > > > > a simpler > > > > way. > > > > > > > > is it necessary to change max_cmd_sn ? > > > > > > > > > > > > > > Hello, > > > > > > Sure, there are alternative methods which could fix this > > > immediate > > > issue. e.g. We could make the command structs for scsi commands > > > get > > > allocated from a mempool. Is there a particular reason you don't > > > want > > > to do anything to modify max_cmd_sn behavior? > > > > according to the description the command was parsed successful and > > sent > > to the initiator. > > > > Yes. > > > Why do we need to change the window ? it's just a race of putting > > the > > context back to the pool. > > > > And this race is rare. > > > > Sure, it's going to be rare. Systems using isert targets with > infiniband are going to be naturally rare. It's part of why I left > the > max_cmd_sn behavior untouched for non-isert iscsit since they seem to > be fine as is. But it's easily and regularly triggered by some > systems > which use isert, so worth fixing. > > > > > > > I didn't do something like this as it seems to me to go against > > > the > > > intent of the design. It makes the iscsi window mostly > > > meaningless in > > > some conditions and complicates any allocation path since it now > > > must > > > gracefully and sanely handle an iscsi_cmd/isert_cmd not existing. > > > I > > > assume special commands like task-management, logouts, and pings > > > would > > > need a separate allocation source to keep from being dropped > > > under > > > memory load. > > > > it won't be dropped. It would be allocated dynamically and freed > > (instead of putting it back to the pool). > > > > If it waits indefinitely for an allocation it ends up with a > variation > of the original problem under memory pressure. If it waits for > allocation on isert receive, then receive stalls under memory > pressure > and won't process the completions which would have released the other > iscsi_cmd structs just needing final acknowledgement. > > David Jeffery > Folks this is a pending issue stopping a customer from making progress. They run Oracle and very high workloads on EDR 100 so David fixed this fosusing on the needs of the isert target changes etc. Are you able to give us technical reasons why David's patch is not suitable and why we he would have to start from scratch. We literally spent weeks on this and built another special lab for fully testing EDR 100. This issue was pending in a BZ for some time and Mellnox had eyes on it then but this latest suggestion was never put forward in that BZ to us. Sincerely Laurence