eal: remove single file segments related code
PATCH 1/1 eal: remove single file segments related code
Commit c711ccb30987 ("ivshmem: remove library and its EAL integration") removed ivshmem support, but seems David forgot to remove the another piece of code: code for RTE_EAL_SINGLE_FILE_SEGMENTS, which is introduced when ivshmem was firstly added.
Now ivshmem was removed and a simple git grep shows no one else references it; I think we can now rmeove it.
---
NOTE: only have done some build tests.
lib/librte_eal/common/eal_filesystem.h | 11 -- lib/librte_eal/common/eal_hugepages.h | 3 - lib/librte_eal/linuxapp/eal/eal_memory.c | 277 +------------------------------ 3 files changed, 3 insertions(+), 288 deletions(-)
lib/librte_eal/common/eal_filesystem.h +0 -11
@@ -97,17 +97,6 @@ eal_get_hugefile_path(char *buffer, size_t buflen, const char *hugedir, int f_idreturn buffer; } -#ifdef RTE_EAL_SINGLE_FILE_SEGMENTS -static inline const char * -eal_get_hugefile_temp_path (char *buffer,size_t buflen,const char *hugedir,int f_id) -{ -snprintf (buffer, buflen,TEMP_HUGEFILE_FMT , hugedir, - internal_config.hugefile_prefix, f_id); - buffer[buflen -1 ] ='\0' ; -return buffer; -} -#endif -/** define the default filename prefix for the %s values above */ #define HUGEFILE_PREFIX_DEFAULT "rte"
lib/librte_eal/common/eal_hugepages.h +0 -3
@@ -52,9 +52,6 @@ struct hugepage_file {int socket_id;/**< NUMA socket ID */ int file_id;/**< the '%d' in HUGEFILE_FMT */ int memseg_id;/**< the memory segment to which page belongs */ -#ifdef RTE_EAL_SINGLE_FILE_SEGMENTS -int repeated;/**< number of times the page size is repeated */ -#endif char filepath[MAX_HUGEPAGE_PATH ];/**< path to backing file on filesystem */ };
lib/librte_eal/linuxapp/eal/eal_memory.c +3 -274
394 lines not on this page · raw message
Signature · 1 line
1.9.0
2016-09-23 15:10, Yuanhan Liu:
Quoted 4 lines
Commit
c711ccb30987("ivshmem: remove library and its EAL integration") removed ivshmem support, but seems David forgot to remove the another piece of code: code forRTE_EAL_SINGLE_FILE_SEGMENTS, which is introduced when ivshmem was firstly added.
It is not a mistake. We thought it is used by container use case.
Quoted 7 lines · Thomas Monjalon
2016-09-23 15:10, Yuanhan Liu:
Quoted 4 lines
Commit
c711ccb30987("ivshmem: remove library and its EAL integration") removed ivshmem support, but seems David forgot to remove the another piece of code: code forRTE_EAL_SINGLE_FILE_SEGMENTS, which is introduced when ivshmem was firstly added.It is not a mistake. We thought it is used by container use case.
I think no. It would help the container case a bit, but not too much I would think, especially when the memory goes fragement.
Jianfeng, IIRC, you don't use that option for container case, right?
--yliu
Quoted 17 lines
-----Original Message-----
From: Yuanhan Liu [mailto:[email protected]]
Sent: Friday, September 23, 2016 5:15 PM
To: Thomas Monjalon
Cc: [email protected]; David Marchand; Tan, Jianfeng
Subject: Re: [PATCH] eal: remove single file segments related codeQuoted 4 lines · Thomas Monjalon
2016-09-23 15:10, Yuanhan Liu:
Quoted 3 lines
Commit
c711ccb30987("ivshmem: remove library and its EAL integration") removed ivshmem support, but seems David forgot to remove the another piece of code: code forRTE_EAL_SINGLE_FILE_SEGMENTS, which isintroduced
Quoted 2 lines
Quoted 1 line
when ivshmem was firstly added.
Quoted 8 lines
Quoted 1 line
It is not a mistake. We thought it is used by container use case.
I think no. It would help the container case a bit, but not too much I would think, especially when the memory goes fragement.
Jianfeng, IIRC, you don't use that option for container case, right?
--yliu
No, I don't use this option for container case. As yuanhan said, it cannot provide much help for virtio_user memory region number limitation.
Thanks,
Jianfeng
Quoted 17 lines · Jianfeng
Quoted 17 lines
-----Original Message-----
From: Yuanhan Liu [mailto:[email protected]]
Sent: Friday, September 23, 2016 5:15 PM
To: Thomas Monjalon
Cc: [email protected]; David Marchand; Tan, Jianfeng
Subject: Re: [PATCH] eal: remove single file segments related codeQuoted 4 lines · Thomas Monjalon
2016-09-23 15:10, Yuanhan Liu:
Quoted 3 lines
Commit
c711ccb30987("ivshmem: remove library and its EAL integration") removed ivshmem support, but seems David forgot to remove the another piece of code: code forRTE_EAL_SINGLE_FILE_SEGMENTS, which isintroduced
Quoted 3 lines
Quoted 1 line
when ivshmem was firstly added.
It is not a mistake. We thought it is used by container use case.
Quoted 8 lines
Quoted 6 lines
I think no. It would help the container case a bit, but not too much I would think, especially when the memory goes fragement.
Jianfeng, IIRC, you don't use that option for container case, right?
--yliuNo, I don't use this option for container case. As yuanhan said, it cannot provide much help for
virtio_usermemory region number limitation.
Ok, as said, since this feature had been introduced with ivshmem 40b966a211ab ("ivshmem: library changes for mmaping using ivshmem"), if Sergio has nothing against this removal, I am all for removing unused code.
Signature · 1 line
David Marchand
Sergio Gonzalez Monroy
Acked-byQuoted 19 lines · David Marchand
Quoted 18 lines · Jianfeng
Quoted 18 lines
-----Original Message-----
From: Yuanhan Liu [mailto:[email protected]]
Sent: Friday, September 23, 2016 5:15 PM
To: Thomas Monjalon
Cc: [email protected]; David Marchand; Tan, Jianfeng
Subject: Re: [PATCH] eal: remove single file segments related codeQuoted 4 lines · Thomas Monjalon
2016-09-23 15:10, Yuanhan Liu:
Quoted 3 lines
Commit
c711ccb30987("ivshmem: remove library and its EAL integration") removed ivshmem support, but seems David forgot to remove the another piece of code: code forRTE_EAL_SINGLE_FILE_SEGMENTS, which isintroduced
Quoted 2 lines
Quoted 1 line
when ivshmem was firstly added.
It is not a mistake. We thought it is used by container use case.
I think no. It would help the container case a bit, but not too much I would think, especially when the memory goes fragement.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Jianfeng, IIRC, you don't use that option for container case, right?
--yliuNo, I don't use this option for container case. As yuanhan said, it cannot provide much help for
virtio_usermemory region number limitation.Ok, as said, since this feature had been introduced with ivshmem
40b966a211ab("ivshmem: library changes for mmaping using ivshmem"), if Sergio has nothing against this removal, I am all for removing unused code.
I certainly do not have anything against this removal :)
Thomas Monjalon
Applied2016-09-30 15:48, Sergio Gonzalez Monroy:
Quoted 24 lines · David Marchand
Quoted 23 lines · Jianfeng
Quoted 22 lines
Quoted 13 lines
-----Original Message-----
From: Yuanhan Liu [mailto:[email protected]]
Sent: Friday, September 23, 2016 5:15 PM
To: Thomas Monjalon
Cc: [email protected]; David Marchand; Tan, Jianfeng
Subject: Re: [PATCH] eal: remove single file segments related codeQuoted 4 lines · Thomas Monjalon
2016-09-23 15:10, Yuanhan Liu:
Quoted 3 lines
Commit
c711ccb30987("ivshmem: remove library and its EAL integration") removed ivshmem support, but seems David forgot to remove the another piece of code: code forRTE_EAL_SINGLE_FILE_SEGMENTS, which isintroduced
Quoted 8 lines
Quoted 2 lines
Quoted 1 line
when ivshmem was firstly added.
It is not a mistake. We thought it is used by container use case.
I think no. It would help the container case a bit, but not too much I would think, especially when the memory goes fragement.
Jianfeng, IIRC, you don't use that option for container case, right?
--yliuNo, I don't use this option for container case. As yuanhan said, it cannot provide much help for
virtio_usermemory region number limitation.
Quoted 8 lines
Quoted 4 lines
Ok, as said, since this feature had been introduced with ivshmem
40b966a211ab("ivshmem: library changes for mmaping using ivshmem"), if Sergio has nothing against this removal, I am all for removing unused code.I certainly do not have anything against this removal :)
Applied, thanks