* [PATCH] mkfs.f2fs: set .so to cold files
@ 2017-11-03 3:13 Jaegeuk Kim
2018-02-05 17:43 ` Ju Hyung Park
0 siblings, 1 reply; 3+ messages in thread
From: Jaegeuk Kim @ 2017-11-03 3:13 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
This patch adds .so in cold file extention list.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
mkfs/f2fs_format.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index 2103f9d..2ba8dd3 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -62,6 +62,7 @@ const char *media_ext_lists[] = {
"jpeg",
"video",
"apk", /* for android system */
+ "so", /* for android system */
NULL
};
--
2.14.0.rc1.383.gd1ce394fe2-goog
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mkfs.f2fs: set .so to cold files
2017-11-03 3:13 [PATCH] mkfs.f2fs: set .so to cold files Jaegeuk Kim
@ 2018-02-05 17:43 ` Ju Hyung Park
2018-02-07 11:42 ` Chao Yu
0 siblings, 1 reply; 3+ messages in thread
From: Ju Hyung Park @ 2018-02-05 17:43 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-f2fs-devel
I'm not entirely familiar with how cold and hot files are treated in f2fs,
but I'm going to assume it has to do something with GC and
less-prioritizing for random R/W operations.
If my assumption is correct, I see some things problematic here.
Android still does a lot of random reads inside .apk files.
While the Java bytecodes are compiled and stored separately in
/data/app/*/base.odex and base.vdex,
resources(graphics, assets, etc) are still directly accessed from the
.apk files(which btw, I really want Google to change to access via
Linux filesystem directly).
And .so extensions are not Android specific. Those are shared
libraries and desktop distros also use them.
A simple `find /usr /lib* -name '*.so' | wc -l` run on my Ubuntu setup
returns 7382 files. While most Android's /system partition is
formatted as ext4, I'm not sure if you still want to do that for the
rest of the user app's libraries(stored in /data/app/*/lib).
Are these really intended?
I'd appreciate if someone explain how cold and hot files are treated
differently.
And also, I don't understand why one would want this hardcoded to the
block device at the time of mkfs.
Wouldn't it make much more sense to ship new lists on each Linux merge
windows and allow users to customize on runtime via sysfs?
On Fri, Nov 3, 2017 at 12:13 PM, Jaegeuk Kim <jaegeuk@kernel.org> wrote:
> This patch adds .so in cold file extention list.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> mkfs/f2fs_format.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
> index 2103f9d..2ba8dd3 100644
> --- a/mkfs/f2fs_format.c
> +++ b/mkfs/f2fs_format.c
> @@ -62,6 +62,7 @@ const char *media_ext_lists[] = {
> "jpeg",
> "video",
> "apk", /* for android system */
> + "so", /* for android system */
> NULL
> };
>
> --
> 2.14.0.rc1.383.gd1ce394fe2-goog
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mkfs.f2fs: set .so to cold files
2018-02-05 17:43 ` Ju Hyung Park
@ 2018-02-07 11:42 ` Chao Yu
0 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2018-02-07 11:42 UTC (permalink / raw)
To: Ju Hyung Park, Jaegeuk Kim; +Cc: linux-f2fs-devel
On 2018/2/6 1:43, Ju Hyung Park wrote:
> I'm not entirely familiar with how cold and hot files are treated in f2fs,
> but I'm going to assume it has to do something with GC and
> less-prioritizing for random R/W operations.
>
> If my assumption is correct, I see some things problematic here.
>
> Android still does a lot of random reads inside .apk files.
> While the Java bytecodes are compiled and stored separately in
> /data/app/*/base.odex and base.vdex,
> resources(graphics, assets, etc) are still directly accessed from the
> .apk files(which btw, I really want Google to change to access via
> Linux filesystem directly).
>
> And .so extensions are not Android specific. Those are shared
> libraries and desktop distros also use them.
> A simple `find /usr /lib* -name '*.so' | wc -l` run on my Ubuntu setup
> returns 7382 files. While most Android's /system partition is
> formatted as ext4, I'm not sure if you still want to do that for the
> rest of the user app's libraries(stored in /data/app/*/lib).
>
> Are these really intended?
Yup.
> I'd appreciate if someone explain how cold and hot files are treated
> differently.
f2fs makes all cold files going into cold type data segments, normally,
predefined cold file won't change in its life time anymore, so we can
expect that there will be less GC triggered on those cold type segment
than segment contains both hot and cold data.
>
> And also, I don't understand why one would want this hardcoded to the
> block device at the time of mkfs.
> Wouldn't it make much more sense to ship new lists on each Linux merge
> windows and allow users to customize on runtime via sysfs?
Agreed. If new cold type file was discovered, we should not let user configure
the extension list by mkfs which may make all data lost.
Thanks,
>
> On Fri, Nov 3, 2017 at 12:13 PM, Jaegeuk Kim <jaegeuk@kernel.org> wrote:
>> This patch adds .so in cold file extention list.
>>
>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
>> ---
>> mkfs/f2fs_format.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
>> index 2103f9d..2ba8dd3 100644
>> --- a/mkfs/f2fs_format.c
>> +++ b/mkfs/f2fs_format.c
>> @@ -62,6 +62,7 @@ const char *media_ext_lists[] = {
>> "jpeg",
>> "video",
>> "apk", /* for android system */
>> + "so", /* for android system */
>> NULL
>> };
>>
>> --
>> 2.14.0.rc1.383.gd1ce394fe2-goog
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Linux-f2fs-devel mailing list
>> Linux-f2fs-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-07 11:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 3:13 [PATCH] mkfs.f2fs: set .so to cold files Jaegeuk Kim
2018-02-05 17:43 ` Ju Hyung Park
2018-02-07 11:42 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).