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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2247C25B07 for ; Wed, 10 Aug 2022 13:52:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B3618E0002; Wed, 10 Aug 2022 09:52:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 662C18E0001; Wed, 10 Aug 2022 09:52:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 502F08E0002; Wed, 10 Aug 2022 09:52:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 421C18E0001 for ; Wed, 10 Aug 2022 09:52:08 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 0D97C1612E6 for ; Wed, 10 Aug 2022 13:52:08 +0000 (UTC) X-FDA: 79783821936.12.09860B8 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by imf20.hostedemail.com (Postfix) with ESMTP id 1E5B41C0182 for ; Wed, 10 Aug 2022 13:52:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1660139526; x=1691675526; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=8p/CQBS45j5tICeYzJJVMoA/fdD7DghNb+CoI4HMZYI=; b=riaX0/IKweVNro3c/aTIpbudDaA4BbVcwdmTW4soSSIz5+0xbJa7T5Z4 oNf/TKLjGkrz3UzABoqlJIefA+FtoP4CHc3fCy+XPXATx+Q5KiST8ddih BzspLN1BOAakYDt+n43FVPjQH9vxc9vKtm88vGbEbDth0gPkGV/5lfn1X xLaQuFIkbDpxzC1vyD30bLqa6erGNgKMacDCGcpMgZq9ogeYeBBPjEca2 uFvjqZyiMsKVGu8cTFJiQ009dF+oLs3VsLxeY93PpNl1vaZ85sRmkFXo1 uK1noKi+sPmlU8jbv4Zv+IudsM6Tam3SKi+sGiU//Mz5yliaCLDX0uKCf Q==; X-IronPort-AV: E=Sophos;i="5.93,227,1654531200"; d="scan'208";a="213366803" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 10 Aug 2022 21:52:05 +0800 IronPort-SDR: Eyn3iE7X8najYWStkRxi13W1ILB0rfJwrCt4OmV5T/LSa0fSvE0hnc7z4b9ORw74TGo1xlTfEC l51Fo3R2jcUzlMrAyYC0js1xAxE3AnqB8kEo/XAJ4rxgLMtNoXrumxbWxpBUoxsuCzJUTs7KnV b7uJg6oupTi1+WMRRdWbEYcKwOjVzZjc/8jz0a+yRBh55yn4/92a9P5PXr0uPDZm+zv0fCTve1 yKuUBkaVvffc9s4uSB/useLPVWw0hlDDizaeQQcVAQNxYglAX5ItwyIQgjNz/MSNeqTe5hzdFf YU5tHq20W/YaG2z7dIhHvFX5 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Aug 2022 06:13:01 -0700 IronPort-SDR: OGiQzc49JhmgWZ8ScqlutT3o96yuUhHzjMSOD1EctCKvAalzoYKzNExGKMY8/miRkDbNjnqsaz f1IzkblljXgI4DSjgD7wIP1ag0mPM7i2RrAQYsrYDRxec0waroLyywAX8xOaEIswGNzgxap/Bi lm6tlNXQqA84gxpwij+fuC5GCU8l+AYRutnDGyCb/nvzvWPCiE/aAIsyJ9ZtENhKgfiPISxCi0 ai454MeuXdtPxTvgQmBYE673S4PuF8TEawvVN/0LLOPt7cBuOe0fkOwEkqhs7Ir48HY7Qxpf2K sLw= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Aug 2022 06:52:06 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4M2rw50tm8z1Rwqy for ; Wed, 10 Aug 2022 06:52:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1660139524; x=1662731525; bh=8p/CQBS45j5tICeYzJJVMoA/fdD7DghNb+C oI4HMZYI=; b=otEE04L7O38+4u+ZpwLBrDlSZUcEYa5JrBnDLS41uaCHAl947nQ LorvLUhPNZGApSJ6qhJJfz2aiSpFyt/tcxeHaVN0STPnS/tLnXFkLWzO0BcJL9BH 8SZPTq3ibepP1sDLOyz5X3Xo+Y/BNUlgCbqvCxI6IG0dTnCjQVnCELdEGILYbUrl qNLVBj9n8r8EzOAx3iWGJtZEtO+X+D0wEjgA+32RPRwZcUMrbsvmfZ6YnFfeGT8R o8iatbjcu3hbRb4OmtvI8s/Oa/OhU9TT4FVFHWKG/t84gohcVnRURowKaSYiYJ/M EbvAq7gTpor3m5xtt8MB5JKPnQAGihWTmsA== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GhsHyXA7Fs6b for ; Wed, 10 Aug 2022 06:52:04 -0700 (PDT) Received: from [10.111.68.99] (c02drav6md6t.sdcorp.global.sandisk.com [10.111.68.99]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4M2rw367vnz1RtVk; Wed, 10 Aug 2022 06:52:03 -0700 (PDT) Message-ID: Date: Wed, 10 Aug 2022 06:52:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [ata] 0568e61225: stress-ng.copy-file.ops_per_sec -15.0% regression Content-Language: en-US To: John Garry , kernel test robot Cc: Christoph Hellwig , "Martin K. Petersen" , LKML , Linux Memory Management List , linux-ide@vger.kernel.org, lkp@lists.01.org, lkp@intel.com, ying.huang@intel.com, feng.tang@intel.com, zhengjun.xing@linux.intel.com, fengwei.yin@intel.com References: <1f498d4a-f93f-ceb4-b713-753196e5e08d@opensource.wdc.com> <3451fa5a-6229-073f-ae18-0c232cd48ed5@huawei.com> <16f03f81-a8c7-bacf-c74c-67231f7f7202@huawei.com> <82dbf4d6-2d43-20ff-22a7-857f9f11a5ce@huawei.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <82dbf4d6-2d43-20ff-22a7-857f9f11a5ce@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660139527; a=rsa-sha256; cv=none; b=PVa2NilUS6y9bc6Db99cnfaFBPGFd3Yl0+3BlnW/7W1MJP74ExcfIavf3+b59RcwW56+bW JCPpewYJKDHV3JoBDBfSpsF0MpcFnKz/q9xphqdo5pbbneFjRhd1FHbRSbzInuuyZvdzNi NJV5oZMUoUhwBdZMAz/Xl0goS3y2Qhs= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none ("invalid DKIM record") header.d=wdc.com header.s=dkim.wdc.com header.b="riaX0/IK"; dkim=pass header.d=opensource.wdc.com header.s=dkim header.b=otEE04L7; dmarc=pass (policy=quarantine) header.from=opensource.wdc.com; spf=pass (imf20.hostedemail.com: domain of "prvs=214ebbc83=damien.lemoal@opensource.wdc.com" designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=214ebbc83=damien.lemoal@opensource.wdc.com" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660139527; h=from:from:sender: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:dkim-signature; bh=4qJ6m4/tXZT/9TZ24dOhC/bCKmC30hwK/6Gjzg4KVVk=; b=dwHM6tlm5roDIeSBhdie1Gu/VRqOQUYQUxPCgYT6kbv2O44QHS0Iy6aZbb45hUR8Fv0gBQ 9UseeFk8N6HWf22Pvh8rpHUTXUTFXj0Ur74BCq5qB1kP+nrV1/Bx7FwSG7EAXVvz0Mv5oI 42I+MjS3C8wvDCK9172VrUocREchnoA= X-Rspamd-Server: rspam10 X-Stat-Signature: muy8huw9fekahg5g4u1spcjawcxhath4 Authentication-Results: imf20.hostedemail.com; dkim=none ("invalid DKIM record") header.d=wdc.com header.s=dkim.wdc.com header.b="riaX0/IK"; dkim=pass header.d=opensource.wdc.com header.s=dkim header.b=otEE04L7; dmarc=pass (policy=quarantine) header.from=opensource.wdc.com; spf=pass (imf20.hostedemail.com: domain of "prvs=214ebbc83=damien.lemoal@opensource.wdc.com" designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=214ebbc83=damien.lemoal@opensource.wdc.com" X-Rspam-User: X-Rspamd-Queue-Id: 1E5B41C0182 X-HE-Tag: 1660139526-325329 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2022/08/10 1:33, John Garry wrote: > On 09/08/2022 15:57, Damien Le Moal wrote: >>>> As far as I can see, this patch should not make a difference unless the >>>> ATA shost driver is setting the max_sectors value unnecessarily low. >>> For __ATA_BASE_SHT, we don't set max_sectors. As such, we default >>> shost->max_sectors = SCSI_DEFAULT_MAX_SECTORS (=1024) in >>> scsi_host_alloc(). I assume no shost dma mapping limit applied. >>> >>> Then - for example - we could select dev->max_sectors = >>> ATA_MAX_SECTORS_LBA48 (=65535) in ata_dev_configure(). >>> >>> So with commit 0568e6122574 we would have final max sectors = 1024, as >>> opposed to 65535 previously. I guess that the problem is something like >>> this. >>> >>> If so, it seems that we would need to apply the shost dma mapping limit >>> separately in ata_scsi_dev_config() and not use shost->max_sectors. >> OK. Will have a look at that. >> > > We may need to introduce something like shost->max_hw_sectors, which is > set according to sht max sectors and dma mapping limits. That could be > also used in USB scsiglue slave_configure() > > Or else set max_sectors value for __ATA_BASE_SHT, but I don't know a > sane value there considering ATA_MAX_SECTORS_LBA48 gives max_sectors of > 65535. > > Damien, please let me know if you need help now. I am just waiting for > you to test to prove this theory about dev->max_sectors being capped. I > don't have an AHCI setup readily-available for testing - just SAS cards > or QEMU. I am on it. > > Thanks, > John -- Damien Le Moal Western Digital Research