diff options
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 0f603651e..180becb80 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | * | 25 | * |
26 | * TODO: | 26 | * TODO: |
27 | * - introduce random latency in processing | ||
28 | * - more statistics | 27 | * - more statistics |
29 | */ | 28 | */ |
30 | #include "platform.h" | 29 | #include "platform.h" |
@@ -2235,7 +2234,7 @@ test_put_load_too_high (uint32_t priority) | |||
2235 | if (GNUNET_LOAD_get_average (datastore_put_load) < 50) | 2234 | if (GNUNET_LOAD_get_average (datastore_put_load) < 50) |
2236 | return GNUNET_NO; /* very fast */ | 2235 | return GNUNET_NO; /* very fast */ |
2237 | ld = GNUNET_LOAD_get_load (datastore_put_load); | 2236 | ld = GNUNET_LOAD_get_load (datastore_put_load); |
2238 | if ( (ld < 1) || (ld < priority) ) | 2237 | if (ld < 2.0 * (1 + priority)) |
2239 | return GNUNET_NO; | 2238 | return GNUNET_NO; |
2240 | GNUNET_STATISTICS_update (stats, | 2239 | GNUNET_STATISTICS_update (stats, |
2241 | gettext_noop ("# storage requests dropped due to high load"), | 2240 | gettext_noop ("# storage requests dropped due to high load"), |
@@ -3408,7 +3407,7 @@ handle_p2p_put (void *cls, | |||
3408 | putl = GNUNET_LOAD_get_load (datastore_put_load); | 3407 | putl = GNUNET_LOAD_get_load (datastore_put_load); |
3409 | if ( (GNUNET_NO == prq.request_found) && | 3408 | if ( (GNUNET_NO == prq.request_found) && |
3410 | ( (GNUNET_YES != active_migration) || | 3409 | ( (GNUNET_YES != active_migration) || |
3411 | (putl > 2.0) ) ) | 3410 | (putl > 2.5 * (1 + prq.priority)) ) ) |
3412 | { | 3411 | { |
3413 | cp = GNUNET_CONTAINER_multihashmap_get (connected_peers, | 3412 | cp = GNUNET_CONTAINER_multihashmap_get (connected_peers, |
3414 | &other->hashPubKey); | 3413 | &other->hashPubKey); |
@@ -3892,7 +3891,7 @@ handle_p2p_get (void *cls, | |||
3892 | pr->namespace = (GNUNET_HashCode*) &pr[1]; | 3891 | pr->namespace = (GNUNET_HashCode*) &pr[1]; |
3893 | memcpy (&pr[1], &opt[bits++], sizeof (GNUNET_HashCode)); | 3892 | memcpy (&pr[1], &opt[bits++], sizeof (GNUNET_HashCode)); |
3894 | } | 3893 | } |
3895 | if ( (GNUNET_LOAD_get_load (cp->transmission_delay) > 3) || | 3894 | if ( (GNUNET_LOAD_get_load (cp->transmission_delay) > 3 * (1 + priority)) || |
3896 | (GNUNET_LOAD_get_average (cp->transmission_delay) > | 3895 | (GNUNET_LOAD_get_average (cp->transmission_delay) > |
3897 | GNUNET_CONSTANTS_MAX_CORK_DELAY.value * 2 + GNUNET_LOAD_get_average (rt_entry_lifetime)) ) | 3896 | GNUNET_CONSTANTS_MAX_CORK_DELAY.value * 2 + GNUNET_LOAD_get_average (rt_entry_lifetime)) ) |
3898 | { | 3897 | { |