Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933376AbcDYTE2 (ORCPT ); Mon, 25 Apr 2016 15:04:28 -0400 Received: from mail-bn1bon0078.outbound.protection.outlook.com ([157.56.111.78]:59424 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933305AbcDYTE0 (ORCPT ); Mon, 25 Apr 2016 15:04:26 -0400 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; linbit.com; dkim=none (message not signed) header.d=none;linbit.com; dmarc=bestguesspass action=none header.from=sandisk.com; X-AuditID: ac160c69-5f3ff70000000be7-a9-571e6612bcce Subject: Re: [Drbd-dev] [PATCH 05/30] drbd: Introduce new disk config option rs-discard-granularity To: Philipp Reisner References: <1461586077-11581-1-git-send-email-philipp.reisner@linbit.com> <1461586077-11581-6-git-send-email-philipp.reisner@linbit.com> <571E393E.1010003@sandisk.com> <2101862.7IMGIqiMZK@phil-dell-xps.local> CC: Jens Axboe , "linux-kernel@vger.kernel.org" , "drbd-dev@lists.linbit.com" From: Bart Van Assche Message-ID: <571E667E.4080200@sandisk.com> Date: Mon, 25 Apr 2016 11:48:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <2101862.7IMGIqiMZK@phil-dell-xps.local> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPLMWRmVeSWpSXmKPExsWyRoxnka5Qmly4wevpKhb/9xxjs3h4dQWL xeVdc9gsXs58zOTA4jGx+R27x9MrR5g8Wh60sXl83iQXwBLFZZOSmpNZllqkb5fAlTH15xPW gj7uiq0HbzA2MH7h6GLk5JAQMJH4ueQFcxcjF4eQwFwmie4Ve1khnB2MEpf+/mWCqdo6ZTIb RGIpo8Sux2+ZQRLCAq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W fLjXtopzx4Q7x9WPrbZ+k5BbXrR99e5WeUc5qVN/dgeEMu3fFS3F9Oj6t816d6RZVeO/HD98 o3G+uPIF32V+01Xe6es4KX07JLpy6oFkJZbijERDLeai4kQABSxFUPYBAAA= X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:63.163.107.21;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(24454002)(199003)(377454003)(33656002)(2906002)(230783001)(86362001)(23676002)(65816999)(230700001)(1220700001)(4326007)(81166005)(83506001)(586003)(50466002)(1096002)(36756003)(53416004)(2950100001)(77096005)(65806001)(64126003)(65956001)(80316001)(5003600100002)(87936001)(93886004)(47776003)(6806005)(110136002)(92566002)(50986999)(87266999)(54356999)(5008740100001)(76176999)(2270400002)(106466001)(189998001)(11100500001)(4001350100001)(3076002);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR0201MB1871;H:milsmgep15.sandisk.com;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD032;1:gtXvfqhW0tdFh2bg0WCUEdI1wIsEQnXAbp+wBnIHxPcMyviB69x2DR1lLyryvZt1LT3bLajnFcc5mEO1xIsYCw9e3e1SZ1hcXvLrsmAs5Tf4Z6g6S0mpND2R3uipuAUg0i9ScvLgVNIFxqClKWPFYUZ2WyVllUX+Fe+4x4TVk1tkUVe4PkW4XgNb/bJ1gPlNWmqcceRdTJJyBBali4giVbF6vNVkcCUfn+KzOU4WZJOmC1kqGY4lpulJ78mUxudbIQuta8PGGYmjyjkkjvBKRYJRN1mvCrgKmhEd6HrVyLiWwWUbiHPMlNZseIe+uYXHphl78AdCXl6V/tgBgsujZBNXWViVYMEMHgngTrnzqY3JHFLG4h3FA5hBvsJuc2TftOwru/iJ7Bc3X3J2OnDbER4DiNYIcTaGL9zrfaDZQ508Kdht2ENSQiOpsdGYijvk X-MS-Office365-Filtering-Correlation-Id: f25c6afb-8cd2-483e-44d2-08d36d3a325c X-Microsoft-Exchange-Diagnostics: 1;SN1PR0201MB1871;2:2/BqHKBZRzRfJI+rmC92T+qraMGMRmhv+PgEH5UCr2HOTfptQ71scIURYSffucCJKtYi5gEbYBFqJotxF4iMoSylY+11nR9/dwXGGxRBPKNUyJmIKvxWpPwhZ7V6V+EHwPtE2+I/QIDXjYnzZnpoUQKPA1FW0rLj5POCqJNaMq7KorSBgQJ0/DUlHk3rxAj1;3:ag4YP62M3SeUw3c5dTjPixSs187bro5NHB7TjUl0fglm31C7vS9dHUettrQ2nJmJxktO+Y9AsH+Z7RF2bGZT4Xdqq27yzsZ6xh34yIsnDifXmdbzUpPTpB1GwBffdUlKSsmaep1R/Lu3i3tuIY2uom2X3dL6MEsivSgswi2n90BhlC/QVvhWTIBXhKa+8E/nr+ax5lDkMSUhHZROxf884ALy9FGyfeX1fzowjGd65DDJnTL3vF1+npSb5qTr6aI06mULwdXVVrO8iwZA6hm2lg==;25:mgqLfJ4FCNv/Qxs67QPIPWL0m/vXj6hvXnEvoJ+rtxzKO7rB1bb9+IDIgoSEL46XdnRMOohrJtSuLgr5dt81OprQnQbvClCIS0Suxd585gPlmuzFCVA8YfaxFftXhvqKdnS/0t2+zbn11T07bEMLu5pQR/xZ7fnnyweN5UY6eufkMu5gCBEUyCEnTvNPVTYDFNiiWI5VSgLbSk/4dfZWzXwANmztqjE1leftLkWnkrj8BFnn5HQymaY8ptG8JfIBd0fyKX/gRrW8adf+evgvJ4ezY80dK9swuWCmaxvlse/5NXUd3EG8eTWbcsMC78uh0HSMyG2WhxIAoMVeKsLdpA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:SN1PR0201MB1871; X-Microsoft-Exchange-Diagnostics: 1;SN1PR0201MB1871;20:3MW73pIgc5dTDJWPxI3qAbDfGsWKM4qHPS4BcGmX2BtNbBL6HeHE6SsPC0gTxzWiJQ7Qnnc4XnwMKpUH0iRgOV7ljpFfN5YXY9ckj5NN1bt8H20SLWIhYN+qeRr2aGJ2sid4GBkGNjVcH78Epo9lfcKztNg3F6fxmUv9nBKMkXf92yrPoHKCHHYRtKW3Aym1xtdHczg6jUWCn7fPO/EX6p+nbA+XmFPVzMglp55R6Pqo4Xz17GrjCf8bmoSPq/EGkUqd6MJbDmch2zP2ucVzRvA/U8i6+cVCeU/7tXpQ+R9an4p9kfRlmHFGz+JEjzHG2BUiEgTCK4TWyaRl/W0NH0yFoT6iMI33qx8DVMMBzG1w8FQYJTR7VIEQkXqVqB5GLYzXXlCpJIn2JSrrWwbgAWQEQfD7B0peZRE3T7pz1BOB0Pn1lmYsJ4Ls8z1tW/HYE0XLkXiwhAeZUXCsV8AlSmaFgkQaxtkDUO+NZqgFpv/jVKV86q9kEkktmBFMur/T X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(3002001)(10201501046)(6055026);SRVR:SN1PR0201MB1871;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0201MB1871; X-Microsoft-Exchange-Diagnostics: 1;SN1PR0201MB1871;4:67DKBmt6rgYvS+PkmyFu+dT8p2yXi9Am8v7ewtnAcJGz4HvOlpU5kf7OyAEQkrjgFPARYAfyQP60QeAv7RGFypKXMdH+hJX1UDY5iwlo736HKtDudE/Bf7BsTx6ypfOwGCwudwvSd7J0evgz7gHKlHfk5SGEHONgB8VQC5reZMWArK89iPFIRRhy7Jcfx0yw2lbMxwANZi1YsxmwVdodh9Nb0Iji5jsV33X0CK38CKD7F+N/wfnRHlKNyqjTnYiyQTLCarQ9YqyvCq8nfvM52qw2eX85obWSj+WPItsLLnF7npVwj3nooDYpe7cMWNUQOINQrZG487I+uj67gs3fFP5WtG+RIVY8jFpS8Nu1U35m+7ZKDrP37elciVLf8E+dhzcQEdaAA2MRkJJ+HaJQYLE019N2YJ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8C8Q4eYRQbpc40D3lDKbvrooLGxPxLmgQTTVMpO2AjYYxDMYnKUXReqcargKyMXBNmZTPDiyIplZWOdG6Jtjp9nr2j6aqvGKbUXcOfhFL80sElKV2gCEtZhS1AmC18OdjvbJ/slS7MUaSJgh9rW2xhyGUmTvJdPKkJlU+Yq+LODBuyY1uzzhbMiGtBQxx/T;24:x8Fipg3/nOj7dSY4zRV5s0CR2mGwl5m6izp9AVh71poVA7z/a5KazVd9VzQ6/YWbzKADsOpJYICrh+4VdvJDlQvAab8OmD79ixcLZt5gmsQ=;7:Qjh0UHKzvMs9ZEqud8D2CT5yRELuChkznKUCOYTzQkLWTMH3xYJczm9bJVpubqpskEmzpQprpWUrETItn+i2ti2JOkpDSWCNCGwIj0REMbnIDFHP163YmQ22hEIgmMFjfYYIR0HeeG6IuxMxayoUoIPUgpVrnAriq5rDPR+uMZMvQ6BvoJfId5nElFdMzhcofcpQ4rGy0qEvqYJkOrWwgttlcs7a6YgA1Ya1rpgOVyc=;20:IUco0kKwl9V1jP1Yzk8qgz81PnY2ifZbSSWEGVvyhlj9ujTQag44xjUn/xCdbzSLwe9pr+FbbCNQ92zHGNBgMFz98cvPJLHjJRTVhgSX5xZJOsDbeveJPiYCRTAbmjNphd7jrsqjRr6ImLtuQCEE7YeGyESkeQHCLBaNlhBmOT64kzOocIs4OyoFpdD+nJ2PmwSyqalsaPgWqj6gn15EaW0/sq61glOaC3GmGGz1pYYCueaydfdtezPN36qrqy1T SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2016 18:48:30.9342 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d;Ip=[63.163.107.21];Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0201MB1871 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1390 Lines: 30 On 04/25/2016 09:42 AM, Philipp Reisner wrote: > Am Montag, 25. April 2016, 08:35:26 schrieb Bart Van Assche: >> On 04/25/2016 05:10 AM, Philipp Reisner wrote: >>> As long as the value is 0 the feature is disabled. With setting >>> it to a positive value, DRBD limits and aligns its resync requests >>> to the rs-discard-granularity setting. If the sync source detects >>> all zeros in such a block, the resync target discards the range >>> on disk. >> >> Can you explain why rs-discard-granularity is configurable instead of >> e.g. setting it to the least common multiple of the discard >> granularities of the underlying block devices at both sides? > > we had this idea as well. It seems that real world devices like larger > discards better than smaller discards. The other motivation was that > a device mapper logical volume might change it on the fly... > So we think it is best to delegate the decision on the discard chunk > size to user space. Hello Phil, Are you aware that for aligned discard requests the discard granularity does not affect the size of discard requests at all? Regarding LVM volumes: if the discard granularity for such volumes can change on the fly, shouldn't I/O be quiesced by the LVM kernel driver before it changes the discard granularity? I think that increasing discard granularity while I/O is in progress should be considered as a bug. Bart.