[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20231018100848.i26yrkuufv4koluq@green245>
Date: Wed, 18 Oct 2023 15:38:48 +0530
From: Nitesh Jagadeesh Shetty <nj.shetty@...sung.com>
To: Jinyoung Choi <j-young.choi@...sung.com>
Cc: Jens Axboe <axboe@...nel.dk>, Jonathan Corbet <corbet@....net>,
Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...nel.org>,
"dm-devel@...hat.com" <dm-devel@...hat.com>,
Keith Busch <kbusch@...nel.org>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
Chaitanya Kulkarni <kch@...dia.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"nitheshshetty@...il.com" <nitheshshetty@...il.com>,
"anuj1072538@...il.com" <anuj1072538@...il.com>,
SSDR Gost Dev <gost.dev@...sung.com>,
"mcgrof@...nel.org" <mcgrof@...nel.org>,
Vincent Kang Fu <vincent.fu@...sung.com>,
Anuj Gupta <anuj20.g@...sung.com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH v16 04/12] block: add emulation for copy
On 26/09/23 03:37PM, Nitesh Jagadeesh Shetty wrote:
>>>+ write_bio->bi_iter.bi_size = chunk;
>>>+ ret = submit_bio_wait(write_bio);
>>>+ kfree(write_bio);
>>
>>blk_mq_map_bio_put(write_bio) ?
>>or bio_uninit(write_bio); kfree(write_bio)?
>>
>>hmm...
>>It continuously allocates and releases memory for bio,
>>Why don't you just allocate and reuse bio outside the loop?
>>
>
>Agree, we will update this in next version.
>
Reusing the bio won't work in cases where the bio gets split.
So we decided to keep the previous design.
Thank you,
Nitesh Shetty
Powered by blists - more mailing lists