* [PATCH net-next] net: dst: remove gc leftovers
@ 2019-03-20 19:02 Julian Wiedmann
2019-03-20 23:03 ` Wei Wang
2019-03-21 20:39 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Julian Wiedmann @ 2019-03-20 19:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Julian Wiedmann, Wei Wang
Get rid of some obsolete gc-related documentation and macros that were
missed in commit 5b7c9a8ff828 ("net: remove dst gc related code").
CC: Wei Wang <weiwan@google.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
one more time, with cc netdev...
include/net/dst.h | 11 -----------
net/core/dst.c | 17 -----------------
net/ipv4/route.c | 2 +-
3 files changed, 1 insertion(+), 29 deletions(-)
diff --git a/include/net/dst.h b/include/net/dst.h
index 6cf0870414c7..12b31c602cb0 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -19,17 +19,6 @@
#include <net/neighbour.h>
#include <asm/processor.h>
-#define DST_GC_MIN (HZ/10)
-#define DST_GC_INC (HZ/2)
-#define DST_GC_MAX (120*HZ)
-
-/* Each dst_entry has reference count and sits in some parent list(s).
- * When it is removed from parent list, it is "freed" (dst_free).
- * After this it enters dead state (dst->obsolete > 0) and if its refcnt
- * is zero, it can be destroyed immediately, otherwise it is added
- * to gc list and garbage collector periodically checks the refcnt.
- */
-
struct sk_buff;
struct dst_entry {
diff --git a/net/core/dst.c b/net/core/dst.c
index a263309df115..1f13d90cd0e4 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -26,23 +26,6 @@
#include <net/dst.h>
#include <net/dst_metadata.h>
-/*
- * Theory of operations:
- * 1) We use a list, protected by a spinlock, to add
- * new entries from both BH and non-BH context.
- * 2) In order to keep spinlock held for a small delay,
- * we use a second list where are stored long lived
- * entries, that are handled by the garbage collect thread
- * fired by a workqueue.
- * 3) This list is guarded by a mutex,
- * so that the gc_task and dst_dev_event() can be synchronized.
- */
-
-/*
- * We want to keep lock & list close together
- * to dirty as few cache lines as possible in __dst_free().
- * As this is not a very strong hint, we dont force an alignment on SMP.
- */
int dst_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb)
{
kfree_skb(skb);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index a5da63e5faa2..14c7fdacaa72 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1176,7 +1176,7 @@ static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
*
* When a PMTU/redirect information update invalidates a route,
* this is indicated by setting obsolete to DST_OBSOLETE_KILL or
- * DST_OBSOLETE_DEAD by dst_free().
+ * DST_OBSOLETE_DEAD.
*/
if (dst->obsolete != DST_OBSOLETE_FORCE_CHK || rt_is_expired(rt))
return NULL;
--
2.16.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: dst: remove gc leftovers
2019-03-20 19:02 [PATCH net-next] net: dst: remove gc leftovers Julian Wiedmann
@ 2019-03-20 23:03 ` Wei Wang
2019-03-21 20:39 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Wei Wang @ 2019-03-20 23:03 UTC (permalink / raw)
To: Julian Wiedmann; +Cc: David Miller, Linux Kernel Network Developers
On Wed, Mar 20, 2019 at 12:03 PM Julian Wiedmann <jwi@linux.ibm.com> wrote:
>
> Get rid of some obsolete gc-related documentation and macros that were
> missed in commit 5b7c9a8ff828 ("net: remove dst gc related code").
>
> CC: Wei Wang <weiwan@google.com>
> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
> ---
Acked-by: Wei Wang <weiwan@google.com>
>
> one more time, with cc netdev...
>
> include/net/dst.h | 11 -----------
> net/core/dst.c | 17 -----------------
> net/ipv4/route.c | 2 +-
> 3 files changed, 1 insertion(+), 29 deletions(-)
>
> diff --git a/include/net/dst.h b/include/net/dst.h
> index 6cf0870414c7..12b31c602cb0 100644
> --- a/include/net/dst.h
> +++ b/include/net/dst.h
> @@ -19,17 +19,6 @@
> #include <net/neighbour.h>
> #include <asm/processor.h>
>
> -#define DST_GC_MIN (HZ/10)
> -#define DST_GC_INC (HZ/2)
> -#define DST_GC_MAX (120*HZ)
> -
> -/* Each dst_entry has reference count and sits in some parent list(s).
> - * When it is removed from parent list, it is "freed" (dst_free).
> - * After this it enters dead state (dst->obsolete > 0) and if its refcnt
> - * is zero, it can be destroyed immediately, otherwise it is added
> - * to gc list and garbage collector periodically checks the refcnt.
> - */
> -
> struct sk_buff;
>
> struct dst_entry {
> diff --git a/net/core/dst.c b/net/core/dst.c
> index a263309df115..1f13d90cd0e4 100644
> --- a/net/core/dst.c
> +++ b/net/core/dst.c
> @@ -26,23 +26,6 @@
> #include <net/dst.h>
> #include <net/dst_metadata.h>
>
> -/*
> - * Theory of operations:
> - * 1) We use a list, protected by a spinlock, to add
> - * new entries from both BH and non-BH context.
> - * 2) In order to keep spinlock held for a small delay,
> - * we use a second list where are stored long lived
> - * entries, that are handled by the garbage collect thread
> - * fired by a workqueue.
> - * 3) This list is guarded by a mutex,
> - * so that the gc_task and dst_dev_event() can be synchronized.
> - */
> -
> -/*
> - * We want to keep lock & list close together
> - * to dirty as few cache lines as possible in __dst_free().
> - * As this is not a very strong hint, we dont force an alignment on SMP.
> - */
> int dst_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb)
> {
> kfree_skb(skb);
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index a5da63e5faa2..14c7fdacaa72 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1176,7 +1176,7 @@ static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
> *
> * When a PMTU/redirect information update invalidates a route,
> * this is indicated by setting obsolete to DST_OBSOLETE_KILL or
> - * DST_OBSOLETE_DEAD by dst_free().
> + * DST_OBSOLETE_DEAD.
> */
> if (dst->obsolete != DST_OBSOLETE_FORCE_CHK || rt_is_expired(rt))
> return NULL;
> --
> 2.16.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: dst: remove gc leftovers
2019-03-20 19:02 [PATCH net-next] net: dst: remove gc leftovers Julian Wiedmann
2019-03-20 23:03 ` Wei Wang
@ 2019-03-21 20:39 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-03-21 20:39 UTC (permalink / raw)
To: jwi; +Cc: netdev, weiwan
From: Julian Wiedmann <jwi@linux.ibm.com>
Date: Wed, 20 Mar 2019 20:02:56 +0100
> Get rid of some obsolete gc-related documentation and macros that were
> missed in commit 5b7c9a8ff828 ("net: remove dst gc related code").
>
> CC: Wei Wang <weiwan@google.com>
> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
> ---
> one more time, with cc netdev...
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-21 20:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 19:02 [PATCH net-next] net: dst: remove gc leftovers Julian Wiedmann
2019-03-20 23:03 ` Wei Wang
2019-03-21 20:39 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.