* Remove softirq scheduling from pktgen [PATCH]
@ 2007-08-27 16:57 Robert Olsson
2007-08-27 17:18 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Robert Olsson @ 2007-08-27 16:57 UTC (permalink / raw)
To: David Miller; +Cc: Robert.Olsson, netdev
Hello, It's not a job for pktgen.
Cheers
--ro
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 18601af..975e887 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -164,7 +164,7 @@
#include <asm/div64.h> /* do_div */
#include <asm/timex.h>
-#define VERSION "pktgen v2.68: Packet Generator for packet performance testing.\n"
+#define VERSION "pktgen v2.69: Packet Generator for packet performance testing.\n"
/* The buckets are exponential in 'width' */
#define LAT_BUCKETS_MAX 32
@@ -381,7 +381,6 @@ struct pktgen_thread {
struct list_head th_list;
struct task_struct *tsk;
char result[512];
- u32 max_before_softirq; /* We'll call do_softirq to prevent starvation. */
/* Field for thread to receive "posted" events terminate, stop ifs etc. */
@@ -1752,9 +1751,6 @@ static int pktgen_thread_show(struct seq_file *seq, void *v)
BUG_ON(!t);
- seq_printf(seq, "Name: %s max_before_softirq: %d\n",
- t->tsk->comm, t->max_before_softirq);
-
seq_printf(seq, "Running: ");
if_lock(t);
@@ -1787,7 +1783,6 @@ static ssize_t pktgen_thread_write(struct file *file,
int i = 0, max, len, ret;
char name[40];
char *pg_result;
- unsigned long value = 0;
if (count < 1) {
// sprintf(pg_result, "Wrong command format");
@@ -1861,12 +1856,8 @@ static ssize_t pktgen_thread_write(struct file *file,
}
if (!strcmp(name, "max_before_softirq")) {
- len = num_arg(&user_buffer[i], 10, &value);
- mutex_lock(&pktgen_thread_lock);
- t->max_before_softirq = value;
- mutex_unlock(&pktgen_thread_lock);
+ sprintf(pg_result, "OK: Note! max_before_softirq is obsoleted -- Do not use");
ret = count;
- sprintf(pg_result, "OK: max_before_softirq=%lu", value);
goto out;
}
@@ -2145,7 +2136,6 @@ static void spin(struct pktgen_dev *pkt_dev, __u64 spin_until_us)
if (spin_until_us - now > jiffies_to_usecs(1) + 1)
schedule_timeout_interruptible(1);
else if (spin_until_us - now > 100) {
- do_softirq();
if (!pkt_dev->running)
return;
if (need_resched())
@@ -3515,8 +3505,6 @@ static int pktgen_thread_worker(void *arg)
struct pktgen_thread *t = arg;
struct pktgen_dev *pkt_dev = NULL;
int cpu = t->cpu;
- u32 max_before_softirq;
- u32 tx_since_softirq = 0;
BUG_ON(smp_processor_id() != cpu);
@@ -3526,8 +3514,6 @@ static int pktgen_thread_worker(void *arg)
pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, current->pid);
- max_before_softirq = t->max_before_softirq;
-
set_current_state(TASK_INTERRUPTIBLE);
set_freezable();
@@ -3546,24 +3532,9 @@ static int pktgen_thread_worker(void *arg)
__set_current_state(TASK_RUNNING);
- if (pkt_dev) {
-
+ if (pkt_dev)
pktgen_xmit(pkt_dev);
- /*
- * We like to stay RUNNING but must also give
- * others fair share.
- */
-
- tx_since_softirq += pkt_dev->last_ok;
-
- if (tx_since_softirq > max_before_softirq) {
- if (local_softirq_pending())
- do_softirq();
- tx_since_softirq = 0;
- }
- }
-
if (t->control & T_STOP) {
pktgen_stop(t);
t->control &= ~(T_STOP);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Remove softirq scheduling from pktgen [PATCH]
2007-08-27 16:57 Remove softirq scheduling from pktgen [PATCH] Robert Olsson
@ 2007-08-27 17:18 ` Christoph Hellwig
2007-08-27 18:22 ` Robert Olsson
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2007-08-27 17:18 UTC (permalink / raw)
To: Robert Olsson; +Cc: David Miller, netdev
On Mon, Aug 27, 2007 at 06:57:19PM +0200, Robert Olsson wrote:
>
>
> Hello, It's not a job for pktgen.
Please also kill the do_softirq export while you're at it.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Remove softirq scheduling from pktgen [PATCH]
2007-08-27 17:18 ` Christoph Hellwig
@ 2007-08-27 18:22 ` Robert Olsson
0 siblings, 0 replies; 3+ messages in thread
From: Robert Olsson @ 2007-08-27 18:22 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Robert Olsson, David Miller, netdev
Christoph Hellwig writes:
> > Hello, It's not a job for pktgen.
>
> Please also kill the do_softirq export while you're at it.
Right seems like pktgen luckily was the only user.
Cheers
--ro
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 0f546dd..dbbdcd7 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -271,8 +271,6 @@ asmlinkage void do_softirq(void)
local_irq_restore(flags);
}
-EXPORT_SYMBOL(do_softirq);
-
#endif
/*
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-27 18:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-27 16:57 Remove softirq scheduling from pktgen [PATCH] Robert Olsson
2007-08-27 17:18 ` Christoph Hellwig
2007-08-27 18:22 ` Robert Olsson
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).