Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4002941rwb; Tue, 16 Aug 2022 12:32:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR4b3vY9Dja+B+3MKtu2L4lGQNLuoBlWrIf70fj4QXIC8eVCCxUnsl9OXkDLzF4xC7JZDJVL X-Received: by 2002:a17:90a:c58e:b0:1f3:1ab5:22ae with SMTP id l14-20020a17090ac58e00b001f31ab522aemr91069pjt.45.1660678336786; Tue, 16 Aug 2022 12:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660678336; cv=none; d=google.com; s=arc-20160816; b=W2GP9OVPAAntGb3tijlHr+pCEPufFW+68hicIFxSrk3k0mZgpVQSPE/GKuO/u7KQ8l SAPrOwSxeMGVU9q7Y1Ew39Z2k1R4n47I+0xEaM6Ljln7F6/PElPb9esZj3m5EMtu8K6o NXZG9UMdlufrMlQKVK4vutnhuRdePgUP1eLkP1HBOXgrcnWeZfuqZzuRMFUF6L+FlH0O zMMo8dWBlbYTeizA4b3QvjIf0OrO1XV7IBOHKG7ppjdTAIAqleKjPdRehmMVX9JvTdgd Zl4GltxWTJvgJYtyvTfkGhhsq4dahBdBOGoP2vVK/lUeZlc3gRFOLhpCsYtsUhG52IDc OzVA== 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; bh=90MZxOEHExE9o/mWVAIq7NZQ2k2Re129UmHEMBWb/cE=; b=SUl33hyZpQL6OZZuStBfbqA63Es/kDIuJToaTPvszErY7OndjDdxvDvudd4gwfmJ8B 8Kn1ZNCSyfcglgPXXsxk0t9Oty9SM9/4NbzoPbLRr/RU2X26O13SA7rqK2+xensumzp2 xvaW57ijC+m0eHckNqnsqkOuigYgWOGzvFJjElDwFOjm5En4mp3dUnOPd9e6FqgZZjj7 9Sn23jnrpSLcJUgRFTLp6xVRkNeAJKZkML7hoJdTqaCKzHAB2fSdK1r8uutEubFxnnwF ZmsmyhOvI+M7FvyzgKzI1J4+gmCc1l6hNszyONoyiDl9HG5K/kDALrYB9rQDtV53kgtC DvEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aLAqWpKF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a6545ce000000b004208b9d6243si16905580pgr.325.2022.08.16.12.32.03; Tue, 16 Aug 2022 12:32:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aLAqWpKF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234406AbiHPS75 (ORCPT + 99 others); Tue, 16 Aug 2022 14:59:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231529AbiHPS7y (ORCPT ); Tue, 16 Aug 2022 14:59:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A8480E86 for ; Tue, 16 Aug 2022 11:59:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6B55061453 for ; Tue, 16 Aug 2022 18:59:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34836C433C1; Tue, 16 Aug 2022 18:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660676392; bh=Ho0zP0tjQ5vo8CvRRj/Yp9BYqpgN6hZxTc9hBSwpJt0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aLAqWpKFE7/Q2xz/1RM36PQ4Ky8Xy+Emnh7gYOfh0g17UUUTfh/vXcXyCn9AmOK03 3IHEeCROFVguFxE86RLvqtz0ai7XTbNSGjdNEfJ6LZ/9H/ZkXZAYMxMwCItAbl2OTs 40YliqLfzFWAUiK/goTrz/t1GK0Olca8tmKSQWUL1RO5gnCpAPavrNYb354vQFPCGt cVk+LQCC+sZxMPaCf9uBB4YwuSmBQMYvmKxdUQXdJ9qgycHLjJCbwBwoUUkXHSaV93 r1syMAyXciFHW6mWf0otMqp0LHItGSVDjSDzX17ueCyQNApgnPMfdepEmP2xLoW2Yr iZUmhwDOc+rtw== Date: Tue, 16 Aug 2022 12:59:49 -0600 From: Keith Busch To: "Fabio M. De Francesco" Cc: Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Ira Weiny Subject: Re: [RFC PATCH] nvmet-tcp: Don't kmap() pages which can't come from HIGHMEM Message-ID: References: <20220816091808.23236-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220816091808.23236-1-fmdefrancesco@gmail.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 16, 2022 at 11:18:08AM +0200, Fabio M. De Francesco wrote: > > Therefore, I have two questions: am I right about thinking that the pages > mapped in nvmet_tcp_map_pdu_iovec() are allocated with GFP_KERNEL? I think you are correct. > If so, can anyone with more knowledge than mine please say if my changes make > any sense? I think it does make sense. I like the code simplification, though this use was't really paying the kmap penalty since, as you mentioned, this is never highmem. You should also remove the cmd's 'nr_mapped' field while you're at it, otherwise you'll hit the WARN in nvmet_tcp_free_cmd_buffers().