Skip to contentSkip to conversation

eal: remove single file segments related code

PATCH Applied Yuanhan Liu 5 participants 7 messages Sep 23, 2016 – Oct 3, 2016

lore
Share & tools
lore
#0 lore raw

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.

Cc David Marchand <[email protected]>

---

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
index fdb4a70..8acbd99 100644
@@ -97,17 +97,6 @@ eal_get_hugefile_path(char *buffer, size_t buflen, const char *hugedir, int f_id
 	return 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
index 38edac0..68369f2 100644
@@ -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
#1 lore raw

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 for RTE_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.

#2 lore raw
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 for RTE_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
#3 lore raw
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 code

Quoted 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 for RTE_EAL_SINGLE_FILE_SEGMENTS, which is

introduced

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

#4 lore raw
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 code

Quoted 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 for RTE_EAL_SINGLE_FILE_SEGMENTS, which is

introduced

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?

      --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.

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
#5 lore raw
Quoted 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 code

Quoted 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 for RTE_EAL_SINGLE_FILE_SEGMENTS, which is

introduced

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?

       --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.

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 :)

#6 lore raw

2016-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 code

Quoted 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 for RTE_EAL_SINGLE_FILE_SEGMENTS, which is

introduced

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?

       --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.

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