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 us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C6CCC4321E for ; Wed, 4 May 2022 21:23:35 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-125-m0ca-qAJOpCrA5VUlrjV6A-1; Wed, 04 May 2022 17:23:31 -0400 X-MC-Unique: m0ca-qAJOpCrA5VUlrjV6A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 48560899ED4; Wed, 4 May 2022 21:23:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38276403D193; Wed, 4 May 2022 21:23:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 89E8D19451F2; Wed, 4 May 2022 21:23:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D70401947043 for ; Wed, 4 May 2022 21:18:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8CA4B40CF8F8; Wed, 4 May 2022 21:18:56 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8872B40CF8EA for ; Wed, 4 May 2022 21:18:56 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 70B3D29AB453 for ; Wed, 4 May 2022 21:18:56 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-580-32NNwjsPPoGxsrHXZGA2Aw-1; Wed, 04 May 2022 17:18:54 -0400 X-MC-Unique: 32NNwjsPPoGxsrHXZGA2Aw-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BABED210E5; Wed, 4 May 2022 21:18:52 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B60DD131BD; Wed, 4 May 2022 21:18:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ptTKKrvtcmJMMQAAMHmgww (envelope-from ); Wed, 04 May 2022 21:18:51 +0000 Date: Wed, 4 May 2022 23:14:40 +0200 From: David Sterba To: Pankaj Raghav Message-ID: <20220504211440.GU18596@suse.cz> Mail-Followup-To: dsterba@suse.cz, Pankaj Raghav , Johannes Thumshirn , "jaegeuk@kernel.org" , "axboe@kernel.dk" , "snitzer@kernel.org" , "hch@lst.de" , "mcgrof@kernel.org" , Naohiro Aota , "sagi@grimberg.me" , "damien.lemoal@opensource.wdc.com" , "dsterba@suse.com" , "linux-kernel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "clm@fb.com" , "gost.dev@samsung.com" , "chao@kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "josef@toxicpanda.com" , "jonathan.derrick@linux.dev" , "agk@redhat.com" , "kbusch@kernel.org" , "kch@nvidia.com" , "linux-nvme@lists.infradead.org" , "dm-devel@redhat.com" , "bvanassche@acm.org" , "jiangbo.365@bytedance.com" , "linux-fsdevel@vger.kernel.org" , Matias =?iso-8859-1?Q?Bj=F8rling?= , "linux-block@vger.kernel.org" References: <20220427160255.300418-1-p.raghav@samsung.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mailman-Approved-At: Wed, 04 May 2022 21:23:25 +0000 Subject: Re: [dm-devel] [PATCH 00/16] support non power of 2 zoned devices X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: dsterba@suse.cz Cc: "jiangbo.365@bytedance.com" , "linux-nvme@lists.infradead.org" , "clm@fb.com" , "dm-devel@redhat.com" , "hch@lst.de" , "agk@redhat.com" , Naohiro Aota , "sagi@grimberg.me" , "gost.dev@samsung.com" , "damien.lemoal@opensource.wdc.com" , "jonathan.derrick@linux.dev" , "kch@nvidia.com" , "chao@kernel.org" , "snitzer@kernel.org" , "josef@toxicpanda.com" , "linux-block@vger.kernel.org" , "dsterba@suse.com" , "kbusch@kernel.org" , "jaegeuk@kernel.org" , Matias =?iso-8859-1?Q?Bj=F8rling?= , "bvanassche@acm.org" , "axboe@kernel.dk" , Johannes Thumshirn , "linux-kernel@vger.kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "mcgrof@kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, May 03, 2022 at 11:12:04AM +0200, Pankaj Raghav wrote: > Hi Johannes, > On 2022-05-03 00:07, Johannes Thumshirn wrote: > >> There was an effort previously [1] to add support to non po2 devices via > >> device level emulation but that was rejected with a final conclusion > >> to add support for non po2 zoned device in the complete stack[2]. > > > > Hey Pankaj, > > > > One thing I'm concerned with this patches is, once we have npo2 zones (or to be precise > > not fs_info->sectorsize aligned zones) we have to check on every allocation if we still > > have at least have fs_info->sectorsize bytes left in a zone. If not we need to > > explicitly finish the zone, otherwise we'll run out of max active zones. > > > This commit: `btrfs: zoned: relax the alignment constraint for zoned > devices` makes sure the zone size is BTRFS_STRIPE_LEN aligned (64K). So > even the npo2 zoned device should be aligned to `fs_info->sectorsize`, > which is typically 4k. > > This was one of the comment that came from David Sterba: > https://lore.kernel.org/all/20220315142740.GU12643@twin.jikos.cz/ > where he suggested to have some sane alignment for the zone sizes. My idea of 'sane' value would be 1M, that we have 4K for sectors is because of the 1:1 mapping to pages, but RAM sizes are on a different scale than storage devices. The 4K is absolute minimum but if the page size is taken as a basic constraint, ARM has 64K and there are some 256K arches. -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel 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 79FF5C433EF for ; Wed, 4 May 2022 21:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357515AbiEDVWb (ORCPT ); Wed, 4 May 2022 17:22:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbiEDVWb (ORCPT ); Wed, 4 May 2022 17:22:31 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 628E751580; Wed, 4 May 2022 14:18:54 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BABED210E5; Wed, 4 May 2022 21:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651699132; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=npPu7v4PVxjYw5k81v34byZcxUoLWsQ8uewcVPzgU3Y=; b=tM1dspGpfMipCiAbW0HO2dZVPEAgyrff0KMavj6bZk8T37R9hRgCKrWvzwgeAGT0wBlOIm ubeLZ7ieBvBdZyh1MDcuOhs1j09imPderIadxrCmq/Rsm19BAfVTGh1hT5vsADF9X2YLOS su7DARpA5vqfoa0MkPB71ULlFqjV3/w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651699132; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=npPu7v4PVxjYw5k81v34byZcxUoLWsQ8uewcVPzgU3Y=; b=vS6Y/NRPgUhS2xB+r59V5ZgrZyl8A56t3CcwGyemIqz6M8o7VVvzu6uPNAFvfQz1MtnccG 5x8uPy6F8/V4gpDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B60DD131BD; Wed, 4 May 2022 21:18:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ptTKKrvtcmJMMQAAMHmgww (envelope-from ); Wed, 04 May 2022 21:18:51 +0000 Date: Wed, 4 May 2022 23:14:40 +0200 From: David Sterba To: Pankaj Raghav Cc: Johannes Thumshirn , "jaegeuk@kernel.org" , "axboe@kernel.dk" , "snitzer@kernel.org" , "hch@lst.de" , "mcgrof@kernel.org" , Naohiro Aota , "sagi@grimberg.me" , "damien.lemoal@opensource.wdc.com" , "dsterba@suse.com" , "linux-kernel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "clm@fb.com" , "gost.dev@samsung.com" , "chao@kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "josef@toxicpanda.com" , "jonathan.derrick@linux.dev" , "agk@redhat.com" , "kbusch@kernel.org" , "kch@nvidia.com" , "linux-nvme@lists.infradead.org" , "dm-devel@redhat.com" , "bvanassche@acm.org" , "jiangbo.365@bytedance.com" , "linux-fsdevel@vger.kernel.org" , Matias =?iso-8859-1?Q?Bj=F8rling?= , "linux-block@vger.kernel.org" Subject: Re: [PATCH 00/16] support non power of 2 zoned devices Message-ID: <20220504211440.GU18596@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Pankaj Raghav , Johannes Thumshirn , "jaegeuk@kernel.org" , "axboe@kernel.dk" , "snitzer@kernel.org" , "hch@lst.de" , "mcgrof@kernel.org" , Naohiro Aota , "sagi@grimberg.me" , "damien.lemoal@opensource.wdc.com" , "dsterba@suse.com" , "linux-kernel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "clm@fb.com" , "gost.dev@samsung.com" , "chao@kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "josef@toxicpanda.com" , "jonathan.derrick@linux.dev" , "agk@redhat.com" , "kbusch@kernel.org" , "kch@nvidia.com" , "linux-nvme@lists.infradead.org" , "dm-devel@redhat.com" , "bvanassche@acm.org" , "jiangbo.365@bytedance.com" , "linux-fsdevel@vger.kernel.org" , Matias =?iso-8859-1?Q?Bj=F8rling?= , "linux-block@vger.kernel.org" References: <20220427160255.300418-1-p.raghav@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Tue, May 03, 2022 at 11:12:04AM +0200, Pankaj Raghav wrote: > Hi Johannes, > On 2022-05-03 00:07, Johannes Thumshirn wrote: > >> There was an effort previously [1] to add support to non po2 devices via > >> device level emulation but that was rejected with a final conclusion > >> to add support for non po2 zoned device in the complete stack[2]. > > > > Hey Pankaj, > > > > One thing I'm concerned with this patches is, once we have npo2 zones (or to be precise > > not fs_info->sectorsize aligned zones) we have to check on every allocation if we still > > have at least have fs_info->sectorsize bytes left in a zone. If not we need to > > explicitly finish the zone, otherwise we'll run out of max active zones. > > > This commit: `btrfs: zoned: relax the alignment constraint for zoned > devices` makes sure the zone size is BTRFS_STRIPE_LEN aligned (64K). So > even the npo2 zoned device should be aligned to `fs_info->sectorsize`, > which is typically 4k. > > This was one of the comment that came from David Sterba: > https://lore.kernel.org/all/20220315142740.GU12643@twin.jikos.cz/ > where he suggested to have some sane alignment for the zone sizes. My idea of 'sane' value would be 1M, that we have 4K for sectors is because of the 1:1 mapping to pages, but RAM sizes are on a different scale than storage devices. The 4K is absolute minimum but if the page size is taken as a basic constraint, ARM has 64K and there are some 256K arches. 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3133AC433EF for ; Wed, 4 May 2022 21:19:09 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nmMOo-00022d-Cj; Wed, 04 May 2022 21:19:04 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nmMOm-00022X-Sl for linux-f2fs-devel@lists.sourceforge.net; Wed, 04 May 2022 21:19:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=npPu7v4PVxjYw5k81v34byZcxUoLWsQ8uewcVPzgU3Y=; b=JR6HH3cs8V2M1CVKWotf7XTkas qUkMrYE6zG8YeR8wvHXX0HpmL7a+rpkFv5coyhsbVfn506Xj2Nf1HTSExlgGtYZtrVwEDMKex4oFo I2mhrY4FXsjBxKQ60R8zuyrSAYJSxOkEG/aMIIawsYMFrCdf+XRRid3leUcjY7T/SZ1w=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To:Message-ID: Subject:Cc:To:From:Date:Sender:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=npPu7v4PVxjYw5k81v34byZcxUoLWsQ8uewcVPzgU3Y=; b=PbUlQKJoSQCW7ePADpwgaaHwld je+m8aaBC5eT2NpdN2CnK1ZbcyoJKZsbbm8X4u1fWFNGQXpCnkgfFKxU65hCUlyrDWH+G71PAw6to H2Nguy4iAWVjdKC+MO9iCAI8o3HPctuPcE7S1/75dYWv3OVVvcV+MU9F4D7GXuTRIK6I=; Received: from smtp-out1.suse.de ([195.135.220.28]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.94.2) id 1nmMOh-001T3s-4b for linux-f2fs-devel@lists.sourceforge.net; Wed, 04 May 2022 21:19:03 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BABED210E5; Wed, 4 May 2022 21:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651699132; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=npPu7v4PVxjYw5k81v34byZcxUoLWsQ8uewcVPzgU3Y=; b=tM1dspGpfMipCiAbW0HO2dZVPEAgyrff0KMavj6bZk8T37R9hRgCKrWvzwgeAGT0wBlOIm ubeLZ7ieBvBdZyh1MDcuOhs1j09imPderIadxrCmq/Rsm19BAfVTGh1hT5vsADF9X2YLOS su7DARpA5vqfoa0MkPB71ULlFqjV3/w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651699132; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=npPu7v4PVxjYw5k81v34byZcxUoLWsQ8uewcVPzgU3Y=; b=vS6Y/NRPgUhS2xB+r59V5ZgrZyl8A56t3CcwGyemIqz6M8o7VVvzu6uPNAFvfQz1MtnccG 5x8uPy6F8/V4gpDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B60DD131BD; Wed, 4 May 2022 21:18:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ptTKKrvtcmJMMQAAMHmgww (envelope-from ); Wed, 04 May 2022 21:18:51 +0000 Date: Wed, 4 May 2022 23:14:40 +0200 From: David Sterba To: Pankaj Raghav Message-ID: <20220504211440.GU18596@suse.cz> Mail-Followup-To: dsterba@suse.cz, Pankaj Raghav , Johannes Thumshirn , "jaegeuk@kernel.org" , "axboe@kernel.dk" , "snitzer@kernel.org" , "hch@lst.de" , "mcgrof@kernel.org" , Naohiro Aota , "sagi@grimberg.me" , "damien.lemoal@opensource.wdc.com" , "dsterba@suse.com" , "linux-kernel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "clm@fb.com" , "gost.dev@samsung.com" , "chao@kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "josef@toxicpanda.com" , "jonathan.derrick@linux.dev" , "agk@redhat.com" , "kbusch@kernel.org" , "kch@nvidia.com" , "linux-nvme@lists.infradead.org" , "dm-devel@redhat.com" , "bvanassche@acm.org" , "jiangbo.365@bytedance.com" , "linux-fsdevel@vger.kernel.org" , Matias =?iso-8859-1?Q?Bj=F8rling?= , "linux-block@vger.kernel.org" References: <20220427160255.300418-1-p.raghav@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Headers-End: 1nmMOh-001T3s-4b Subject: Re: [f2fs-dev] [PATCH 00/16] support non power of 2 zoned devices X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: dsterba@suse.cz Cc: "jiangbo.365@bytedance.com" , "linux-nvme@lists.infradead.org" , "clm@fb.com" , "dm-devel@redhat.com" , "hch@lst.de" , "agk@redhat.com" , Naohiro Aota , "sagi@grimberg.me" , "gost.dev@samsung.com" , "damien.lemoal@opensource.wdc.com" , "jonathan.derrick@linux.dev" , "kch@nvidia.com" , "snitzer@kernel.org" , "josef@toxicpanda.com" , "linux-block@vger.kernel.org" , "dsterba@suse.com" , "kbusch@kernel.org" , "jaegeuk@kernel.org" , Matias =?iso-8859-1?Q?Bj=F8rling?= , "bvanassche@acm.org" , "axboe@kernel.dk" , Johannes Thumshirn , "linux-kernel@vger.kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "mcgrof@kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Tue, May 03, 2022 at 11:12:04AM +0200, Pankaj Raghav wrote: > Hi Johannes, > On 2022-05-03 00:07, Johannes Thumshirn wrote: > >> There was an effort previously [1] to add support to non po2 devices via > >> device level emulation but that was rejected with a final conclusion > >> to add support for non po2 zoned device in the complete stack[2]. > > > > Hey Pankaj, > > > > One thing I'm concerned with this patches is, once we have npo2 zones (or to be precise > > not fs_info->sectorsize aligned zones) we have to check on every allocation if we still > > have at least have fs_info->sectorsize bytes left in a zone. If not we need to > > explicitly finish the zone, otherwise we'll run out of max active zones. > > > This commit: `btrfs: zoned: relax the alignment constraint for zoned > devices` makes sure the zone size is BTRFS_STRIPE_LEN aligned (64K). So > even the npo2 zoned device should be aligned to `fs_info->sectorsize`, > which is typically 4k. > > This was one of the comment that came from David Sterba: > https://lore.kernel.org/all/20220315142740.GU12643@twin.jikos.cz/ > where he suggested to have some sane alignment for the zone sizes. My idea of 'sane' value would be 1M, that we have 4K for sectors is because of the 1:1 mapping to pages, but RAM sizes are on a different scale than storage devices. The 4K is absolute minimum but if the page size is taken as a basic constraint, ARM has 64K and there are some 256K arches. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel