#!/bin/bash # # Script will generate one flow per thread (-t N) # - Same destination IP # - Fake source IPs for each flow (fixed based on thread number) # # Useful for scale testing on receiver, to see whether silo'ing flows # works and scales. For optimal scalability (on receiver) each # separate-flow should not access shared variables/data. This script # helps magnify any of these scaling issues by overloading the receiver. # basedir=`dirname $0` source ${basedir}/functions.sh root_check_run_with_sudo "$@" # Parameter parsing via include source ${basedir}/parameters.sh # Set some default params, if they didn't get set [ -z "$DEST_IP" ] && DEST_IP="198.18.0.42" [ -z "$DST_MAC" ] && DST_MAC="90:e2:ba:ff:ff:ff" [ -z "$CLONE_SKB" ] && CLONE_SKB="0" [ -z "$BURST" ] && BURST=32 # Base Config DELAY="0" # Zero means max speed COUNT="0" # Zero means indefinitely # General cleanup everything since last run pg_ctrl "reset" # Threads are specified with parameter -t value in $THREADS for ((thread = 0; thread < $THREADS; thread++)); do dev=${DEV}@${thread} # Add remove all other devices and add_device $dev to thread pg_thread $thread "rem_device_all" pg_thread $thread "add_device" $dev # Base config pg_set $dev "flag QUEUE_MAP_CPU" pg_set $dev "count $COUNT" pg_set $dev "clone_skb $CLONE_SKB" pg_set $dev "pkt_size $PKT_SIZE" pg_set $dev "delay $DELAY" pg_set $dev "flag NO_TIMESTAMP" # Single destination pg_set $dev "dst_mac $DST_MAC" pg_set $dev "dst $DEST_IP" # Setup source IP-addresses based on thread number pg_set $dev "src_min 198.18.$((thread+1)).1" pg_set $dev "src_max 198.18.$((thread+1)).1" # Setup burst, for easy testing -b 0 disable bursting # (internally in pktgen default and minimum burst=1) if [[ ${BURST} -ne 0 ]]; then pg_set $dev "burst $BURST" else info "$dev: Not using burst" fi done # Run if user hits control-c function print_result() { # Print results for ((thread = 0; thread < $THREADS; thread++)); do dev=${DEV}@${thread} echo "Device: $dev" cat /proc/net/pktgen/$dev | grep -A2 "Result:" done } # trap keyboard interrupt (Ctrl-C) trap true SIGINT echo "Running... ctrl^C to stop" >&2 pg_ctrl "start" print_result 6f448c8b79c321e4a1f31f98194e4f6b6cae7'/>
path: root/net/rfkill/rfkill-regulator.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2017-01-30 19:27:10 -0500
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-01-31 09:13:49 -0500
commit79c6f448c8b79c321e4a1f31f98194e4f6b6cae7 (patch)
tree370efda701f03cccf21e02bb1fdd3b852547d75c /net/rfkill/rfkill-regulator.c
parent0c744ea4f77d72b3dcebb7a8f2684633ec79be88 (diff)
tracing: Fix hwlat kthread migration
The hwlat tracer creates a kernel thread at start of the tracer. It is pinned to a single CPU and will move to the next CPU after each period of running. If the user modifies the migration thread's affinity, it will not change after that happens. The original code created the thread at the first instance it was called, but later was changed to destroy the thread after the tracer was finished, and would not be created until the next instance of the tracer was established. The code that initialized the affinity was only called on the initial instantiation of the tracer. After that, it was not initialized, and the previous affinity did not match the current newly created one, making it appear that the user modified the thread's affinity when it did not, and the thread failed to migrate again. Cc: stable@vger.kernel.org Fixes: 0330f7aa8ee6 ("tracing: Have hwlat trace migrate across tracing_cpumask CPUs") Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'net/rfkill/rfkill-regulator.c')