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 62397C25B07 for ; Wed, 10 Aug 2022 13:58:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C34768E0002; Wed, 10 Aug 2022 09:58:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BE2FD8E0001; Wed, 10 Aug 2022 09:58:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A37538E0002; Wed, 10 Aug 2022 09:58:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 8F86A8E0001 for ; Wed, 10 Aug 2022 09:58:00 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 6DC46A0DCD for ; Wed, 10 Aug 2022 13:58:00 +0000 (UTC) X-FDA: 79783836720.23.254E941 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by imf22.hostedemail.com (Postfix) with ESMTP id 861FDC0148 for ; Wed, 10 Aug 2022 13:57:59 +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=1660139879; x=1691675879; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ClWPfH+Jd93qt/z4FiCRJJBeEEPfi5NziKxB5M5sGPk=; b=jjSX9JiJ5DI4pWOSITBc+zvBKhCsIeqSIeT+t6I39Qj2JWre4qV1qK/T FrDuq8w8MXMhZhUKPhYHrE0IHq8mFhK/2zU8FC+VLdf5crM6BufKWrqFC 3Q1qcWiHQihJBRJwluGOz98BWBsJwlWqUFUZQcGquiD0Z4QL/TCeUGP7h C7mdMNLefagaHWeKZu6j/WSuHTFMKu7Jzr2jy5fJH0lgBUQQo4paQuniY hnWzXV4FWaNWmjlReJ/nsEFOlq1NmfGAvC23PSIp25WaMMXfZOwaXVAka LR/yJ9PF/TQP3Fse5WhL4xK6hcDYhRlEzJ2w55BA7WDC3eeimZSjVgZRv A==; X-IronPort-AV: E=Sophos;i="5.93,227,1654531200"; d="scan'208";a="208346640" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 10 Aug 2022 21:57:58 +0800 IronPort-SDR: U6cSJYx+vShiTkdz58+mkBZBs4j/UEfraDrkTuCFDjEoQ5S81TaP3w8Blh67oOSdgDMiHosWfB YE9BINtGuDaWG5uGAtw7GMKO7PEGFbJSGXFzSw2L8D62I1JcNPbKhpGTeTg1XE/r/V6PGIGjTy rPqhBl1aLf9SdgDrrRGXFVAb+qxIX5t1TCd/exFcRnEtXvTSmmanChpg13dIPoX/F5j4KtLTv2 O4zlQRzV6J8/A5gxV2J16tfv04tBbFNVquS8fJWDwwbKVa3PSiRjIDN5cXczQgFKAvGS4t/y/1 7U0NaGAEnf+ZFeoioL5juYVb Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Aug 2022 06:13:33 -0700 IronPort-SDR: xL11g3ULwlqFZw0xKMEyYa6y2CW8aorgSBNSN/R5Q3091ahKtwRHD1kTa6jLv5hfRL4Edy6m37 BGzrwZMYxLNyqTPaBHs8cB3Y9a6eXdwO5bOJ8hoDUNU0ASy6k8swErGLzyW/fxYW6GE2J9vvCS Qv7uL6QspKFUWCr9vx5BGEUBD+LBax2WwPANBM2jz+SLdK1MngfX7ByqednsKstZGeKxbpRg5Z wdble3fF4hfhhqe9ZdzO2JiUEC7jWjgfQEvK06ia5FBESh1m3MiOFk/+V+6QgqDBTUDS1e2ajG 8w4= 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:57:59 -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 4M2s2s2vFbz1Rwry for ; Wed, 10 Aug 2022 06:57:57 -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= 1660139876; x=1662731877; bh=ClWPfH+Jd93qt/z4FiCRJJBeEEPfi5NziKx B5M5sGPk=; b=ZV+zKlNpoD39suCWpwEcYuB/3MZlb0ERjRhMZuhlayBRa5A51aa bTMhqp5RXQe97OilXZA4z4IJkCpXb8SEdl36emCG+zT1gsIBQfetv90QA/oPH85A /OWZahkSW10yOkgvtI1i3gWieZG5MEo2rwqM71m0EeC52fPDjSS92bwHxuGO7qoT QZzlEdwVTuYt2dAcaDNlWhVOnG+Iy01+FddWXvhfVbXkkIJOUzhgT26hBFhVPWkG D1/40D0TsrO2a4tnCJhQzAaRI1PmM6iLSu3rBqLu6KMhUTarD2cru6vpxPOHtInM JqB5NyyTOPzpFMOiABuvx2q+1oSgP0oT1LA== 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 v5bmOAWGAoca for ; Wed, 10 Aug 2022 06:57:56 -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 4M2s2r0RJJz1RtVk; Wed, 10 Aug 2022 06:57:55 -0700 (PDT) Message-ID: Date: Wed, 10 Aug 2022 06:57:55 -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: David Laight , 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> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660139880; 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=prwnxLRmqiMtWnVBjP3Q15xbruWOf7Qmv/GBY527C/E=; b=kyL75e6K9OSAKkUjzKDGi45y+P2BJ3+rs27ZsYRxbDWMQcbuNgYd9pkSzPgBA3TpSSRVnn Wxe25mM1EogpCXvSr/H7duIyG42G8M/yQJVj9JCg4cCpRQYAh+5c1I8MjXkPGRRke35lf3 FWj7R5E0qEJVFl1x+KGMuECye7xg2xw= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none ("invalid DKIM record") header.d=wdc.com header.s=dkim.wdc.com header.b=jjSX9JiJ; dkim=pass header.d=opensource.wdc.com header.s=dkim header.b=ZV+zKlNp; dmarc=pass (policy=quarantine) header.from=opensource.wdc.com; spf=pass (imf22.hostedemail.com: domain of "prvs=214ebbc83=damien.lemoal@opensource.wdc.com" designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=214ebbc83=damien.lemoal@opensource.wdc.com" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660139880; a=rsa-sha256; cv=none; b=zSdRc7JWFzu4zBsKQqpotw00AK+5Sq2EMANUJjftAtdirsomr+/eIins5PXoA1tobqsVKh OG5iiP7Gfn0OWCKacSwMVx0kBqjKNMT7fDROeNgrZhC2KsoGB9z2Xx4Mu2EnmQd0qb/Xcd LJ5rvWhMvDZ71hSSNg+JHTDUXbGsuf8= Authentication-Results: imf22.hostedemail.com; dkim=none ("invalid DKIM record") header.d=wdc.com header.s=dkim.wdc.com header.b=jjSX9JiJ; dkim=pass header.d=opensource.wdc.com header.s=dkim header.b=ZV+zKlNp; dmarc=pass (policy=quarantine) header.from=opensource.wdc.com; spf=pass (imf22.hostedemail.com: domain of "prvs=214ebbc83=damien.lemoal@opensource.wdc.com" designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=214ebbc83=damien.lemoal@opensource.wdc.com" X-Rspamd-Server: rspam02 X-Stat-Signature: c97kjhkz6qidgjfnjpohywg1dfhean9s X-Rspamd-Queue-Id: 861FDC0148 X-Rspam-User: X-HE-Tag: 1660139879-306689 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/09 8:16, David Laight wrote: > ... >>>> Without knowing what the device adapter is, hard to say where the problem is. I >>>> suspect that with the patch applied, we may be ending up with a small default >>>> max_sectors value, causing overhead due to more commands than necessary. >>>> >>>> Will check what I see with my test rig. >>> >>> 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. >> >> That is my hunch too, hence my question about which host driver is being used >> for this test... That is not apparent from the problem report. > > No one's fallen over the old problem and managed to limit > the number of sectors in a read to the number of sectors > in (IIRC) a 'multi sector' read that uses a single DMA burst? > > Was always a good way of killing disk performance. > > IIRC the maximum number of sectors for an ATA disk transfer is 255. That is for super old pata/ide devices. Modern SATA/AHCI disks can do a lot more than that with NCQ/DMA. The default max_sectors_kb for AHCI connected devices is 1280 KB = 2560 sectors, max_segments = 168 and max_segment_size = 65536 B, which gives a reliable command size of at least 168 * 4096 = 688128 B (1344 sectors) with 4KB page size architectures. > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) -- Damien Le Moal Western Digital Research