Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934263AbcCKH0r (ORCPT ); Fri, 11 Mar 2016 02:26:47 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:43017 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932075AbcCKH0j (ORCPT ); Fri, 11 Mar 2016 02:26:39 -0500 X-AuditID: cbfee61b-f793c6d00000236c-7a-56e2732d13db From: Chao Yu To: "'Shawn Lin'" , "'Shawn Lin'" , "'Jaegeuk Kim'" Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <1457666880-14311-1-git-send-email-shawn.lin@rock-chips.com> <00fe01d17b57$30b6e9c0$9224bd40$@samsung.com> <56E266F4.4000200@kernel-upstream.org> In-reply-to: <56E266F4.4000200@kernel-upstream.org> Subject: RE: [f2fs-dev] [PATCH 0/8] some cleanup of inline flag checking Date: Fri, 11 Mar 2016 15:25:49 +0800 Message-id: <010001d17b67$588e8c40$09aba4c0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQIXe4R3YiU+GuEWsJQOhPfjOeHJIADJrNZmAmyhIiWerh6BMA== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBLMWRmVeSWpSXmKPExsVy+t9jQV3d4kdhBr2nOCyerJ/FbHFpkbvF 5V1z2CzubT7GZHHnyXpWB1aPF/NfM3tsWtXJ5rF7wWcmj7+z9rN4fN4kF8AaxWWTkpqTWZZa pG+XwJVx5EsXS8E/hYqTs5cwNjC+k+pi5OSQEDCR+P13BzOELSZx4d56ti5GLg4hgVmMEncP tEI5rxglNs1YC1bFJqAisbzjPxOILSJQK/F51S4gm4ODWcBDYtexUoj6hYwSJ1vXsoLUcAoY Sxy4fI0FxBYGqpm+ZiOYzSKgKnHyyhmwGl4BS4mtrfsYIWxBiR+T74HVMAtoSazfeZwJwpaX 2LzmLdSlChI7zr5mhLjBSeLOiqXsEDXiEhuP3GKZwCg0C8moWUhGzUIyahaSlgWMLKsYJVIL kguKk9JzjfJSy/WKE3OLS/PS9ZLzczcxguPjmfQOxsO73A8xCnAwKvHwfrj2MEyINbGsuDL3 EKMEB7OSCG913KMwId6UxMqq1KL8+KLSnNTiQ4zSHCxK4ryP/68LExJITyxJzU5NLUgtgsky cXBKNTAW3/NnbChc4r1tRezk3NMFaU8nvL1VkjBnUvrzG0um/91Sdy+wTY9l50df73u2KW/u uNT6qR0t+jStx+/6W67sGu8JN1P/la2q17Ct55zz/O9bpr32VqydmRILlRt+Nat9qEoLfdvH 9M1J5/qCnsmuApw1hQ2BLYu7Zx7e/FzjDafO1h2xt4KUWIozEg21mIuKEwEWVoT6iwIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4113 Lines: 107 Hi Shawn, > -----Original Message----- > From: Shawn Lin [mailto:shawn.lin@kernel-upstream.org] > Sent: Friday, March 11, 2016 2:34 PM > To: Chao Yu; 'Shawn Lin'; 'Jaegeuk Kim' > Cc: shawn.lin@kernel-upstream.org; linux-kernel@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH 0/8] some cleanup of inline flag checking > > Hi Chao Yu, > > On 2016/3/11 13:29, Chao Yu wrote: > > Hi Shawn, > > > >> -----Original Message----- > >> From: Shawn Lin [mailto:shawn.lin@rock-chips.com] > >> Sent: Friday, March 11, 2016 11:28 AM > >> To: Jaegeuk Kim > >> Cc: Shawn Lin; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > >> Subject: [f2fs-dev] [PATCH 0/8] some cleanup of inline flag checking > >> > >> > >> This patchset is going to remove some redunant checking > >> of inline data flag and also going to avoid some unnecessary > >> cpu waste when doing inline stuff. > > > > When we are accessing inline inode, inline inode conversion can happen > > concurrently, we should check inline flag again under inode page's lock > > to avoid accessing the wrong inline data which may have been converted. > > > > that sounds reasonable at first glance, and it more seems like that > mopst part of this patchset is just puting the checking in the right way. > > If we need to check the inline inode under the protection of inode > page's lock, it means any callers who calling inline API stuff is > wasting time on checing the flag outside the API, right? As you know, inline conversion was designed as one-way operation, which means inline inode can only be converted to normal inode, but can not be converted in the opposite way. So here, with original design, it is OK to handle inode as regular one if we detect that it is a non-inline inode, since it won't be converted to inline one, otherwise, we should take inode page's lock and check the flag again. Thanks, > > So we can just remove the redundant checking of the caller, but not > change the behaviour of checing inline flag under page's lock? > > Thanks for catching it. > > > Thanks, > > > >> > >> Note: > >> Sorry for sending previous four patches in separate, let > >> drop them and make them in this thread for better review. > >> > >> > >> > >> Shawn Lin (8): > >> f2fs: check inline flag ahead for f2fs_write_inline_data > >> f2fs: remove checing inline data flag for f2fs_write_data_page > >> f2fs: check inline flag ahead for f2fs_read_inline_data > >> f2fs: remove redundant checking of inline data flag > >> f2fs: f2fs: check inline flag ahead for f2fs_inline_data_fiemap > >> f2fs: remove checing inline data flag for f2fs_fiemap > >> f2fs: remove unnecessary inline checking for f2fs_convert_inline_inode > >> f2fs: check inline flag ahead for get_dnode_of_data > >> > >> fs/f2fs/data.c | 17 +++++++---------- > >> fs/f2fs/inline.c | 27 ++++++++++----------------- > >> fs/f2fs/node.c | 12 +++++------- > >> 3 files changed, 22 insertions(+), 34 deletions(-) > >> > >> -- > >> 2.3.7 > >> > >> > >> > >> ------------------------------------------------------------------------------ > >> Transform Data into Opportunity. > >> Accelerate data analysis in your applications with > >> Intel Data Analytics Acceleration Library. > >> Click to learn more. > >> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 > >> _______________________________________________ > >> Linux-f2fs-devel mailing list > >> Linux-f2fs-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel > > > > > > ------------------------------------------------------------------------------ > > Transform Data into Opportunity. > > Accelerate data analysis in your applications with > > Intel Data Analytics Acceleration Library. > > Click to learn more. > > http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 > > _______________________________________________ > > Linux-f2fs-devel mailing list > > Linux-f2fs-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel > >