text:
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/err.h>
#include <linux/spinlock.h>
#include <linux/smp.h>
#include <linux/rcupdate.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/atomic.h>
#include <linux/bitops.h>
#include <linux/completion.h>
#include <linux/moduleparam.h>
#include <linux/percpu.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/freezer.h>
#include <linux/cpu.h>
#include <linux/delay.h>
#include <linux/stat.h>
#include <linux/srcu.h>
#include <linux/slab.h>
#include <linux/trace_clock.h>
#include <asm/byteorder.h>
#include <linux/torture.h>
#include <linux/vmalloc.h>

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul E. McKenney <paulmck@us.ibm.com> and Josh Triplett <josh@joshtriplett.org>");

torture_param(int, cbflood_inter_holdoff, HZ,
	      "Holdoff between floods (jiffies)");
torture_param(int, cbflood_intra_holdoff, 1,
	      "Holdoff between bursts (jiffies)");
torture_param(int, cbflood_n_burst, 3, "# bursts in flood, zero to disable");
torture_param(int, cbflood_n_per_burst, 20000,
	      "# callbacks per burst in flood");
torture_param(int, fqs_duration, 0,
	      "Duration of fqs bursts (us), 0 to disable");
torture_param(int, fqs_holdoff, 0, "Holdoff time within fqs bursts (us)");
torture_param(int, fqs_stutter, 3, "Wait time between fqs bursts (s)");
torture_param(bool, gp_cond, false, "Use conditional/async GP wait primitives");
torture_param(bool, gp_exp, false, "Use expedited GP wait primitives");
torture_param(bool, gp_normal, false,
	     "Use normal (non-expedited) GP wait primitives");
torture_param(bool, gp_sync, false, "Use synchronous GP wait primitives");
torture_param(int, irqreader, 1, "Allow RCU readers from irq handlers");
torture_param(int, n_barrier_cbs, 0,
	     "# of callbacks/kthreads for barrier testing");
torture_param(int, nfakewriters, 4, "Number of RCU fake writer threads");
torture_param(int, nreaders, -1, "Number of RCU reader threads");
torture_param(int, object_debug, 0,
	     "Enable debug-object double call_rcu() testing");
torture_param(int, onoff_holdoff, 0, "Time after boot before CPU hotplugs (s)");
torture_param(int, onoff_interval, 0,
	     "Time between CPU hotplugs (s), 0=disable");
torture_param(int, shuffle_interval, 3, "Number of seconds between shuffles");
torture_param(int, shutdown_secs, 0, "Shutdown time (s), <= zero to disable.");
torture_param(int, stall_cpu, 0, "Stall duration (s), zero to disable.");
torture_param(int, stall_cpu_holdoff, 10,
	     "Time to wait before starting stall (s).");
torture_param(int, stat_interval, 60,
	     "Number of seconds between stats printk()s");
torture_param(int, stutter, 5, "Number of seconds to run/halt test");
torture_param(int, test_boost, 1, "Test RCU prio boost: 0=no, 1=maybe, 2=yes.");
torture_param(int, test_boost_duration, 4,
	     "Duration of each boost test, seconds.");
torture_param(int, test_boost_interval, 7,
	     "Interval between boost tests, seconds.");
torture_param(bool, test_no_idle_hz, true,
	     "Test support for tickless idle CPUs");
torture_param(bool, verbose, true,
	     "Enable verbose debugging printk()s");

static char *torture_type = "rcu";
module_param(torture_type, charp, 0444);
MODULE_PARM_DESC(torture_type, "Type of RCU to torture (rcu, rcu_bh, ...)");

static int nrealreaders;
static int ncbflooders;
static struct task_struct *writer_task;
static struct task_struct **fakewriter_tasks;
static struct task_struct **reader_tasks;
static struct task_struct *stats_task;
static struct task_struct **cbflood_task;
static struct task_struct *fqs_task;
static struct task_struct *boost_tasks[NR_CPUS];
static struct task_struct *stall_task;
static struct task_struct **barrier_cbs_tasks;
static struct task_struct *barrier_task;

#define RCU_TORTURE_PIPE_LEN 10

struct rcu_torture {
	struct rcu_head rtort_rcu;
	int rtort_pipe_count;
	struct list_head rtort_free;
	int rtort_mbtest;
};

static LIST_HEAD(rcu_torture_freelist);
static struct rcu_torture __rcu *rcu_torture_current;
static unsigned long rcu_torture_current_version;
static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
static DEFINE_SPINLOCK(rcu_torture_lock);
static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
		      rcu_torture_count) = { 0 };
static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
		      rcu_torture_batch) = { 0 };
static atomic_t rcu_torture_wcount[RCU_TORTURE_PIPE_LEN + 1];
static atomic_t n_rcu_torture_alloc;
static atomic_t n_rcu_torture_alloc_fail;
static atomic_t n_rcu_torture_free;
static atomic_t n_rcu_torture_mberror;
static atomic_t n_rcu_torture_error;
static long n_rcu_torture_barrier_error;
static long n_rcu_torture_boost_ktrerror;
static long n_rcu_torture_boost_rterror;
static long n_rcu_torture_boost_failure;
static long n_rcu_torture_boosts;
static long n_rcu_torture_timers;
static long n_barrier_attempts;
static long n_barrier_successes;
static atomic_long_t n_cbfloods;
static struct list_head rcu_torture_removed;

static int rcu_torture_writer_state;
#define RTWS_FIXED_DELAY	0
#define RTWS_DELAY		1
#define RTWS_REPLACE		2
#define RTWS_DEF_FREE		3
#define RTWS_EXP_SYNC		4
#define RTWS_COND_GET		5
#define RTWS_COND_SYNC		6
#define RTWS_SYNC		7
#define RTWS_STUTTER		8
#define RTWS_STOPPING		9
static const char * const rcu_torture_writer_state_names[] = {
	"RTWS_FIXED_DELAY",
	"RTWS_DELAY",
	"RTWS_REPLACE",
	"RTWS_DEF_FREE",
	"RTWS_EXP_SYNC",
	"RTWS_COND_GET",
	"RTWS_COND_SYNC",
	"RTWS_SYNC",
	"RTWS_STUTTER",
	"RTWS_STOPPING",
};

static const char *rcu_torture_writer_state_getname(void)
{
	unsigned int i = READ_ONCE(rcu_torture_writer_state);

	if (i >= ARRAY_SIZE(rcu_torture_writer_state_names))
		return "???";
	return rcu_torture_writer_state_names[i];
}

#if defined(MODULE) || defined(CONFIG_RCU_TORTURE_TEST_RUNNABLE)
#define RCUTORTURE_RUNNABLE_INIT 1
#else
#define RCUTORTURE_RUNNABLE_INIT 0
#endif
static int torture_runnable = RCUTORTURE_RUNNABLE_INIT;
module_param(torture_runnable, int, 0444);
MODULE_PARM_DESC(torture_runnable, "Start rcutorture at boot");

#if defined(CONFIG_RCU_BOOST) && !defined(CONFIG_HOTPLUG_CPU)
#define rcu_can_boost() 1
#else /* #if defined(CONFIG_RCU_BOOST) && !defined(CONFIG_HOTPLUG_CPU) */
#define rcu_can_boost() 0
#endif /* #else #if defined(CONFIG_RCU_BOOST) && !defined(CONFIG_HOTPLUG_CPU) */

#ifdef CONFIG_RCU_TRACE
static u64 notrace rcu_trace_clock_local(void)
{
	u64 ts = trace_clock_local();
	unsigned long __maybe_unused ts_rem = do_div(ts, NSEC_PER_USEC);
	return ts;
}
#else /* #ifdef CONFIG_RCU_TRACE */
static u64 notrace rcu_trace_clock_local(void)
{
	return 0ULL;
}
#endif /* #else #ifdef CONFIG_RCU_TRACE */

static unsigned long boost_starttime;	/* jiffies of next boost test start. */
static DEFINE_MUTEX(boost_mutex);	/* protect setting boost_starttime */
					/*  and boost task create/destroy. */
static atomic_t barrier_cbs_count;	/* Barrier callbacks registered. */
static bool barrier_phase;		/* Test phase. */
static atomic_t barrier_cbs_invoked;	/* Barrier callbacks invoked. */
static wait_queue_head_t *barrier_cbs_wq; /* Coordinate barrier testing. */
static DECLARE_WAIT_QUEUE_HEAD(barrier_wq);

/*
 * Allocate an element from the rcu_tortures pool.
 */
static struct rcu_torture *
rcu_torture_alloc(void)
{
	struct list_head *p;

	spin_lock_bh(&rcu_torture_lock);
	if (list_empty(&rcu_torture_freelist)) {
		atomic_inc(&n_rcu_torture_alloc_fail);
		spin_unlock_bh(&rcu_torture_lock);
		return NULL;
	}
	atomic_inc(&n_rcu_torture_alloc);
	p = rcu_torture_freelist.next;
	list_del_init(p);
	spin_unlock_bh(&rcu_torture_lock);
	return container_of(p, struct rcu_torture, rtort_free);
}

/*
 * Free an element to the rcu_tortures pool.
 */
static void
rcu_torture_free(struct rcu_torture *p)
{
	atomic_inc(&n_rcu_torture_free);
	spin_lock_bh(&rcu_torture_lock);
	list_add_tail(&p->rtort_free, &rcu_torture_freelist);
	spin_unlock_bh(&rcu_torture_lock);
}

/*
 * Operations vector for selecting different types of tests.
 */

struct rcu_torture_ops {
	int ttype;
	void (*init)(void);
	void (*cleanup)(void);
	int (*readlock)(void);
	void (*read_delay)(struct torture_random_state *rrsp);
	void (*readunlock)(int idx);
	unsigned long (*started)(void);
	unsigned long (*completed)(void);
	void (*deferred_free)(struct rcu_torture *p);
	void (*sync)(void);
	void (*exp_sync)(void);
	unsigned long (*get_state)(void);
	void (*cond_sync)(unsigned long oldstate);
	call_rcu_func_t call;
	void (*cb_barrier)(void);
	void (*fqs)(void);
	void (*stats)(void);
	int irq_capable;
	int can_boost;
	const char *name;
};

static struct rcu_torture_ops *cur_ops;

/*
 * Definitions for rcu torture testing.
 */

static int rcu_torture_read_lock(void) __acquires(RCU)
{
	rcu_read_lock();
	return 0;
}

static void rcu_read_delay(struct torture_random_state *rrsp)
{
	const unsigned long shortdelay_us = 200;
	const unsigned long longdelay_ms = 50;

	/* We want a short delay sometimes to make a reader delay the grace
	 * period, and we want a long delay occasionally to trigger
	 * force_quiescent_state. */

	if (!(torture_random(rrsp) % (nrealreaders * 2000 * longdelay_ms)))
		mdelay(longdelay_ms);
	if (!(torture_random(rrsp) % (nrealreaders * 2 * shortdelay_us)))
		udelay(shortdelay_us);
#ifdef CONFIG_PREEMPT
	if (!preempt_count() &&
	    !(torture_random(rrsp) % (nrealreaders * 20000)))
		preempt_schedule();  /* No QS if preempt_disable() in effect */
#endif
}

static void rcu_torture_read_unlock(int idx) __releases(RCU)
{
	rcu_read_unlock();
}

/*
 * Update callback in the pipe.  This should be invoked after a grace period.
 */
static bool
rcu_torture_pipe_update_one(struct rcu_torture *rp)
{
	int i;

	i = rp->rtort_pipe_count;
	if (i > RCU_TORTURE_PIPE_LEN)
		i = RCU_TORTURE_PIPE_LEN;
	atomic_inc(&rcu_torture_wcount[i]);
	if (++rp->rtort_pipe_count >= RCU_TORTURE_PIPE_LEN) {
		rp->rtort_mbtest = 0;
		return true;
	}
	return false;
}

/*
 * Update all callbacks in the pipe.  Suitable for synchronous grace-period
 * primitives.
 */
static void
rcu_torture_pipe_update(struct rcu_torture *old_rp)
{
	struct rcu_torture *rp;
	struct rcu_torture *rp1;

	if (old_rp)
		list_add(&old_rp->rtort_free, &rcu_torture_removed);
	list_for_each_entry_safe(rp, rp1, &rcu_torture_removed, rtort_free) {
		if (rcu_torture_pipe_update_one(rp)) {
			list_del(&rp->rtort_free);
			rcu_torture_free(rp);
		}
	}
}

static void
rcu_torture_cb(struct rcu_head *p)
{
	struct rcu_torture *rp = container_of(p, struct rcu_torture, rtort_rcu);

	if (torture_must_stop_irq()) {
		/* Test is ending, just drop callbacks on the floor. */
		/* The next initialization will pick up the pieces. */
		return;
	}
	if (rcu_torture_pipe_update_one(rp))
		rcu_torture_free(rp);
	else
		cur_ops->deferred_free(rp);
}

static unsigned long rcu_no_completed(void)
{
	return 0;
}

static void rcu_torture_deferred_free(struct rcu_torture *p)
{
	call_rcu(&p->rtort_rcu, rcu_torture_cb);
}

static void rcu_sync_torture_init(void)
{
	INIT_LIST_HEAD(&rcu_torture_removed);
}

static struct rcu_torture_ops rcu_ops = {
	.ttype		= RCU_FLAVOR,
	.init		= rcu_sync_torture_init,
	.readlock	= rcu_torture_read_lock,
	.read_delay	= rcu_read_delay,
	.readunlock	= rcu_torture_read_unlock,
	.started	= rcu_batches_started,
	.completed	= rcu_batches_completed,
	.deferred_free	= rcu_torture_deferred_free,
	.sync		= synchronize_rcu,
	.exp_sync	= synchronize_rcu_expedited,
	.get_state	= get_state_synchronize_rcu,
	.cond_sync	= cond_synchronize_rcu,
	.call		= call_rcu,
	.cb_barrier	= rcu_barrier,
	.fqs		= rcu_force_quiescent_state,
	.stats		= NULL,
	.irq_capable	= 1,
	.can_boost	= rcu_can_boost(),
	.name		= "rcu"
};

/*
 * Definitions for rcu_bh torture testing.
 */

static int rcu_bh_torture_read_lock(void) __acquires(RCU_BH)
{
	rcu_read_lock_bh();
	return 0;
}

static void rcu_bh_torture_read_unlock(int idx) __releases(RCU_BH)
{
	rcu_read_unlock_bh();
}

static void rcu_bh_torture_deferred_free(struct rcu_torture *p)
{
	call_rcu_bh(&p->rtort_rcu, rcu_torture_cb);
}

static struct rcu_torture_ops rcu_bh_ops = {
	.ttype		= RCU_BH_FLAVOR,
	.init		= rcu_sync_torture_init,
	.readlock	= rcu_bh_torture_read_lock,
	.read_delay	= rcu_read_delay,  /* just reuse rcu's version. */
	.readunlock	= rcu_bh_torture_read_unlock,
	.started	= rcu_batches_started_bh,
	.completed	= rcu_batches_completed_bh,
	.deferred_free	= rcu_bh_torture_deferred_free,
	.sync		= synchronize_rcu_bh,
	.exp_sync	= synchronize_rcu_bh_expedited,
	.call		= call_rcu_bh,
	.cb_barrier	= rcu_barrier_bh,
	.fqs		= rcu_bh_force_quiescent_state,
	.stats		= NULL,
	.irq_capable	= 1,
	.name		= "rcu_bh"
};

/*
 * Don't even think about trying any of these in real life!!!
 * The names includes "busted", and they really means it!
 * The only purpose of these functions is to provide a buggy RCU
 * implementation to make sure that rcutorture correctly emits
 * buggy-RCU error messages.
 */
static void rcu_busted_torture_deferred_free(struct rcu_torture *p)
{
	/* This is a deliberate bug for testing purposes only! */
	rcu_torture_cb(&p->rtort_rcu);
}

static void synchronize_rcu_busted(void)
{
	/* This is a deliberate bug for testing purposes only! */
}

static void
call_rcu_busted(struct rcu_head *head, rcu_callback_t func)
{
	/* This is a deliberate bug for testing purposes only! */
	func(head);
}

static struct rcu_torture_ops rcu_busted_ops = {
	.ttype		= INVALID_RCU_FLAVOR,
	.init		= rcu_sync_torture_init,
	.readlock	= rcu_torture_read_lock,
	.read_delay	= rcu_read_delay,  /* just reuse rcu's version. */
	.readunlock	= rcu_torture_read_unlock,
	.started	= rcu_no_completed,
	.completed	= rcu_no_completed,
	.deferred_free	= rcu_busted_torture_deferred_free,
	.sync		= synchronize_rcu_busted,
	.exp_sync	= synchronize_rcu_busted,
	.call		= call_rcu_busted,
	.cb_barrier	= NULL,
	.fqs		= NULL,
	.stats		= NULL,
	.irq_capable	= 1,
	.name		= "rcu_busted"
};

/*
 * Definitions for srcu torture testing.
 */

DEFINE_STATIC_SRCU(srcu_ctl);
static struct srcu_struct srcu_ctld;
static struct srcu_struct *srcu_ctlp = &srcu_ctl;

static int srcu_torture_read_lock(void) __acquires(srcu_ctlp)
{
	return srcu_read_lock(srcu_ctlp);
}

static void srcu_read_delay(struct torture_random_state *rrsp)
{
	long delay;
	const long uspertick = 1000000 / HZ;
	const long longdelay = 10;

	/* We want there to be long-running readers, but not all the time. */

	delay = torture_random(rrsp) %
		(nrealreaders * 2 * longdelay * uspertick);
	if (!delay)
		schedule_timeout_interruptible(longdelay);
	else
		rcu_read_delay(rrsp);
}

static void srcu_torture_read_unlock(int idx) __releases(srcu_ctlp)
{
	srcu_read_unlock(srcu_ctlp, idx);
}

static unsigned long srcu_torture_completed(void)
{
	return srcu_batches_completed(srcu_ctlp);
}

static void srcu_torture_deferred_free(struct rcu_torture *rp)
{
	call_srcu(srcu_ctlp, &rp->rtort_rcu, rcu_torture_cb);
}

static void srcu_torture_synchronize(void)
{
	synchronize_srcu(srcu_ctlp);
}

static void srcu_torture_call(struct rcu_head *head,
			      rcu_callback_t func)
{
	call_srcu(srcu_ctlp, head, func);
}

static void srcu_torture_barrier(void)
{
	srcu_barrier(srcu_ctlp);
}

static void srcu_torture_stats(void)
{
	int cpu;
	int idx = srcu_ctlp->completed & 0x1;

	pr_alert("%s%s per-CPU(idx=%d):",
		 torture_type, TORTURE_FLAG, idx);
	for_each_possible_cpu(cpu) {
		long c0, c1;

		c0 = (long)per_cpu_ptr(srcu_ctlp->per_cpu_ref, cpu)->c[!idx];
		c1 = (long)per_cpu_ptr(srcu_ctlp->per_cpu_ref, cpu)->c[idx];
		pr_cont(" %d(%ld,%ld)", cpu, c0, c1);
	}
	pr_cont("\n");
}

static void srcu_torture_synchronize_expedited(void)
{
	synchronize_srcu_expedited(srcu_ctlp);
}

static struct rcu_torture_ops srcu_ops = {
	.ttype		= SRCU_FLAVOR,
	.init		= rcu_sync_torture_init,
	.readlock	= srcu_torture_read_lock,
	.read_delay	= srcu_read_delay,
	.readunlock	= srcu_torture_read_unlock,
	.started	= NULL,
	.completed	= srcu_torture_completed,
	.deferred_free	= srcu_torture_deferred_free,
	.sync		= srcu_torture_synchronize,
	.exp_sync	= srcu_torture_synchronize_expedited,
	.call		= srcu_torture_call,
	.cb_barrier	= srcu_torture_barrier,
	.stats		= srcu_torture_stats,
	.name		= "srcu"
};

static void srcu_torture_init(void)
{
	rcu_sync_torture_init();
	WARN_ON(init_srcu_struct(&srcu_ctld));
	srcu_ctlp = &srcu_ctld;
}

static void srcu_torture_cleanup(void)
{
	cleanup_srcu_struct(&srcu_ctld);
	srcu_ctlp = &srcu_ctl; /* In case of a later rcutorture run. */
}

/* As above, but dynamically allocated. */
static struct rcu_torture_ops srcud_ops = {
	.ttype		= SRCU_FLAVOR,
	.init		= srcu_torture_init,
	.cleanup	= srcu_torture_cleanup,
	.readlock	= srcu_torture_read_lock,
	.read_delay	= srcu_read_delay,
	.readunlock	= srcu_torture_read_unlock,
	.started	= NULL,
	.completed	= srcu_torture_completed,
	.deferred_free	= srcu_torture_deferred_free,
	.sync		= srcu_torture_synchronize,
	.exp_sync	= srcu_torture_synchronize_expedited,
	.call		= srcu_torture_call,
	.cb_barrier	= srcu_torture_barrier,
	.stats		= srcu_torture_stats,
	.name		= "srcud"
};

/*
 * Definitions for sched torture testing.
 */

static int sched_torture_read_lock(void)
{
	preempt_disable();
	return 0;
}

static void sched_torture_read_unlock(int idx)
{
	preempt_enable();
}

static void rcu_sched_torture_deferred_free(struct rcu_torture *p)
{
	call_rcu_sched(&p->rtort_rcu, rcu_torture_cb);
}

static struct rcu_torture_ops sched_ops = {
	.ttype		= RCU_SCHED_FLAVOR,
	.init		= rcu_sync_torture_init,
	.readlock	= sched_torture_read_lock,
	.read_delay	= rcu_read_delay,  /* just reuse rcu's version. */
	.readunlock	= sched_torture_read_unlock,
	.started	= rcu_batches_started_sched,
	.completed	= rcu_batches_completed_sched,
	.deferred_free	= rcu_sched_torture_deferred_free,
	.sync		= synchronize_sched,
	.exp_sync	= synchronize_sched_expedited,
	.get_state	= get_state_synchronize_sched,
	.cond_sync	= cond_synchronize_sched,
	.call		= call_rcu_sched,
	.cb_barrier	= rcu_barrier_sched,
	.fqs		= rcu_sched_force_quiescent_state,
	.stats		= NULL,
	.irq_capable	= 1,
	.name		= "sched"
};

#ifdef CONFIG_TASKS_RCU

/*
 * Definitions for RCU-tasks torture testing.
 */

static int tasks_torture_read_lock(void)
{
	return 0;
}

static void tasks_torture_read_unlock(int idx)
{
}

static void rcu_tasks_torture_deferred_free(struct rcu_torture *p)
{
	call_rcu_tasks(&p->rtort_rcu, rcu_torture_cb);
}

static struct rcu_torture_ops tasks_ops = {
	.ttype		= RCU_TASKS_FLAVOR,
	.init		= rcu_sync_torture_init,
	.readlock	= tasks_torture_read_lock,
	.read_delay	= rcu_read_delay,  /* just reuse rcu's version. */
	.readunlock	= tasks_torture_read_unlock,
	.started	= rcu_no_completed,
	.completed	= rcu_no_completed,
	.deferred_free	= rcu_tasks_torture_deferred_free,
	.sync		= synchronize_rcu_tasks,
	.exp_sync	= synchronize_rcu_tasks,
	.call		= call_rcu_tasks,
	.cb_barrier	= rcu_barrier_tasks,
	.fqs		= NULL,
	.stats		= NULL,
	.irq_capable	= 1,
	.name		= "tasks"
};

#define RCUTORTURE_TASKS_OPS &tasks_ops,

static bool __maybe_unused torturing_tasks(void)
{
	return cur_ops == &tasks_ops;
}

#else /* #ifdef CONFIG_TASKS_RCU */

#define RCUTORTURE_TASKS_OPS

static bool __maybe_unused torturing_tasks(void)
{
	return false;
}

#endif /* #else #ifdef CONFIG_TASKS_RCU */

/*
 * RCU torture priority-boost testing.  Runs one real-time thread per
 * CPU for moderate bursts, repeatedly registering RCU callbacks and
 * spinning waiting for them to be invoked.  If a given callback takes
 * too long to be invoked, we assume that priority inversion has occurred.
 */

struct rcu_boost_inflight {
	struct rcu_head rcu;
	int inflight;
};

static void rcu_torture_boost_cb(struct rcu_head *head)
{
	struct rcu_boost_inflight *rbip =
		container_of(head, struct rcu_boost_inflight, rcu);

	/* Ensure RCU-core accesses precede clearing ->inflight */
	smp_store_release(&rbip->inflight, 0);
}

static int rcu_torture_boost(void *arg)
{
	unsigned long call_rcu_time;
	unsigned long endtime;
	unsigned long oldstarttime;
	struct rcu_boost_inflight rbi = { .inflight = 0 };
	struct sched_param sp;

	VERBOSE_TOROUT_STRING("rcu_torture_boost started");

	/* Set real-time priority. */
	sp.sched_priority = 1;
	if (sched_setscheduler(current, SCHED_FIFO, &sp) < 0) {
		VERBOSE_TOROUT_STRING("rcu_torture_boost RT prio failed!");
		n_rcu_torture_boost_rterror++;
	}

	init_rcu_head_on_stack(&rbi.rcu);
	/* Each pass through the following loop does one boost-test cycle. */
	do {
		/* Wait for the next test interval. */
		oldstarttime = boost_starttime;
		while (ULONG_CMP_LT(jiffies, oldstarttime)) {
			schedule_timeout_interruptible(oldstarttime - jiffies);
			stutter_wait("rcu_torture_boost");
			if (torture_must_stop())
				goto checkwait;
		}

		/* Do one boost-test interval. */
		endtime = oldstarttime + test_boost_duration * HZ;
		call_rcu_time = jiffies;
		while (ULONG_CMP_LT(jiffies, endtime)) {
			/* If we don't have a callback in flight, post one. */
			if (!smp_load_acquire(&rbi.inflight)) {
				/* RCU core before ->inflight = 1. */
				smp_store_release(&rbi.inflight, 1);
				call_rcu(&rbi.rcu, rcu_torture_boost_cb);
				if (jiffies - call_rcu_time >
					 test_boost_duration * HZ - HZ / 2) {
					VERBOSE_TOROUT_STRING("rcu_torture_boost boosting failed");
					n_rcu_torture_boost_failure++;
				}
				call_rcu_time = jiffies;
			}
			stutter_wait("rcu_torture_boost");
			if (torture_must_stop())
				goto checkwait;
		}

		/*
		 * Set the start time of the next test interval.
		 * Yes, this is vulnerable to long delays, but such
		 * delays simply cause a false negative for the next
		 * interval.  Besides, we are running at RT priority,
		 * so delays should be relatively rare.
		 */
		while (oldstarttime == boost_starttime &&
		       !kthread_should_stop()) {
			if (mutex_trylock(&boost_mutex)) {
				boost_starttime = jiffies +
						  test_boost_interval * HZ;
				n_rcu_torture_boosts++;
				mutex_unlock(&boost_mutex);
				break;
			}
			schedule_timeout_uninterruptible(1);
		}

		/* Go do the stutter. */
checkwait:	stutter_wait("rcu_torture_boost");
	} while (!torture_must_stop());

	/* Clean up and exit. */
	while (!kthread_should_stop() || smp_load_acquire(&rbi.inflight)) {
		torture_shutdown_absorb("rcu_torture_boost");
		schedule_timeout_uninterruptible(1);
	}
	destroy_rcu_head_on_stack(&rbi.rcu);
	torture_kthread_stopping("rcu_torture_boost");
	return 0;
}

static void rcu_torture_cbflood_cb(struct rcu_head *rhp)
{
}

/*
 * RCU torture callback-flood kthread.  Repeatedly induces bursts of calls
 * to call_rcu() or analogous, increasing the probability of occurrence
 * of callback-overflow corner cases.
 */
static int
rcu_torture_cbflood(void *arg)
{
	int err = 1;
	int i;
	int j;
	struct rcu_head *rhp;

	if (cbflood_n_per_burst > 0 &&
	    cbflood_inter_holdoff > 0 &&
	    cbflood_intra_holdoff > 0 &&
	    cur_ops->call &&
	    cur_ops->cb_barrier) {
		rhp = vmalloc(sizeof(*rhp) *
			      cbflood_n_burst * cbflood_n_per_burst);
		err = !rhp;
	}
	if (err) {
		VERBOSE_TOROUT_STRING("rcu_torture_cbflood disabled: Bad args or OOM");
		goto wait_for_stop;
	}
	VERBOSE_TOROUT_STRING("rcu_torture_cbflood task started");
	do {
		schedule_timeout_interruptible(cbflood_inter_holdoff);
		atomic_long_inc(&n_cbfloods);
		WARN_ON(signal_pending(current));
		for (i = 0; i < cbflood_n_burst; i++) {
			for (j = 0; j < cbflood_n_per_burst; j++) {
				cur_ops->call(&rhp[i * cbflood_n_per_burst + j],
					      rcu_torture_cbflood_cb);
			}
			schedule_timeout_interruptible(cbflood_intra_holdoff);
			WARN_ON(signal_pending(current));
		}
		cur_ops->cb_barrier();
		stutter_wait("rcu_torture_cbflood");
	} while (!torture_must_stop());
	vfree(rhp);
wait_for_stop:
	torture_kthread_stopping("rcu_torture_cbflood");
	return 0;
}

/*
 * RCU torture force-quiescent-state kthread.  Repeatedly induces
 * bursts of calls to force_quiescent_state(), increasing the probability
 * of occurrence of some important types of race conditions.
 */
static int
rcu_torture_fqs(void *arg)
{
	unsigned long fqs_resume_time;
	int fqs_burst_remaining;

	VERBOSE_TOROUT_STRING("rcu_torture_fqs task started");
	do {
		fqs_resume_time = jiffies + fqs_stutter * HZ;
		while (ULONG_CMP_LT(jiffies, fqs_resume_time) &&
		       !kthread_should_stop()) {
			schedule_timeout_interruptible(1);
		}
		fqs_burst_remaining = fqs_duration;
		while (fqs_burst_remaining > 0 &&
		       !kthread_should_stop()) {
			cur_ops->fqs();
			udelay(fqs_holdoff);
			fqs_burst_remaining -= fqs_holdoff;
		}
		stutter_wait("rcu_torture_fqs");
	} while (!torture_must_stop());
	torture_kthread_stopping("rcu_torture_fqs");
	return 0;
}

/*
 * RCU torture writer kthread.  Repeatedly substitutes a new structure
 * for that pointed to by rcu_torture_current, freeing the old structure
 * after a series of grace periods (the "pipeline").
 */
static int
rcu_torture_writer(void *arg)
{
	bool can_expedite = !rcu_gp_is_expedited();
	int expediting = 0;
	unsigned long gp_snap;
	bool gp_cond1 = gp_cond, gp_exp1 = gp_exp, gp_normal1 = gp_normal;
	bool gp_sync1 = gp_sync;
	int i;
	struct rcu_torture *rp;
	struct rcu_torture *old_rp;
	static DEFINE_TORTURE_RANDOM(rand);
	int synctype[] = { RTWS_DEF_FREE, RTWS_EXP_SYNC,
			   RTWS_COND_GET, RTWS_SYNC };
	int nsynctypes = 0;

	VERBOSE_TOROUT_STRING("rcu_torture_writer task started");
	pr_alert("%s" TORTURE_FLAG
		 " Grace periods expedited from boot/sysfs for %s,\n",
		 torture_type, cur_ops->name);
	pr_alert("%s" TORTURE_FLAG
		 " Testing of dynamic grace-period expediting diabled.\n",
		 torture_type);

	/* Initialize synctype[] array.  If none set, take default. */
	if (!gp_cond1 && !gp_exp1 && !gp_normal1 && !gp_sync1)
		gp_cond1 = gp_exp1 = gp_normal1 = gp_sync1 = true;
	if (gp_cond1 && cur_ops->get_state && cur_ops->cond_sync)
		synctype[nsynctypes++] = RTWS_COND_GET;
	else if (gp_cond && (!cur_ops->get_state || !cur_ops->cond_sync))
		pr_alert("rcu_torture_writer: gp_cond without primitives.\n");
	if (gp_exp1 && cur_ops->exp_sync)
		synctype[nsynctypes++] = RTWS_EXP_SYNC;
	else if (gp_exp && !cur_ops->exp_sync)
		pr_alert("rcu_torture_writer: gp_exp without primitives.\n");
	if (gp_normal1 && cur_ops->deferred_free)
		synctype[nsynctypes++] = RTWS_DEF_FREE;
	else if (gp_normal && !cur_ops->deferred_free)
		pr_alert("rcu_torture_writer: gp_normal without primitives.\n");
	if (gp_sync1 && cur_ops->sync)
		synctype[nsynctypes++] = RTWS_SYNC;
	else if (gp_sync && !cur_ops->sync)
		pr_alert("rcu_torture_writer: gp_sync without primitives.\n");
	if (WARN_ONCE(nsynctypes == 0,
		      "rcu_torture_writer: No update-side primitives.\n")) {
		/*
		 * No updates primitives, so don't try updating.
		 * The resulting test won't be testing much, hence the
		 * above WARN_ONCE().
		 */
		rcu_torture_writer_state = RTWS_STOPPING;
		torture_kthread_stopping("rcu_torture_writer");
	}

	do {
		rcu_torture_writer_state = RTWS_FIXED_DELAY;
		schedule_timeout_uninterruptible(1);
		rp = rcu_torture_alloc();
		if (rp == NULL)
			continue;
		rp->rtort_pipe_count = 0;
		rcu_torture_writer_state = RTWS_DELAY;
		udelay(torture_random(&rand) & 0x3ff);
		rcu_torture_writer_state = RTWS_REPLACE;
		old_rp = rcu_dereference_check(rcu_torture_current,
					       current == writer_task);
		rp->rtort_mbtest = 1;
		rcu_assign_pointer(rcu_torture_current, rp);
		smp_wmb(); /* Mods to old_rp must follow rcu_assign_pointer() */
		if (old_rp) {
			i = old_rp->rtort_pipe_count;
			if (i > RCU_TORTURE_PIPE_LEN)
				i = RCU_TORTURE_PIPE_LEN;
			atomic_inc(&rcu_torture_wcount[i]);
			old_rp->rtort_pipe_count++;
			switch (synctype[torture_random(&rand) % nsynctypes]) {
			case RTWS_DEF_FREE:
				rcu_torture_writer_state = RTWS_DEF_FREE;
				cur_ops->deferred_free(old_rp);
				break;
			case RTWS_EXP_SYNC:
				rcu_torture_writer_state = RTWS_EXP_SYNC;
				cur_ops->exp_sync();
				rcu_torture_pipe_update(old_rp);
				break;
			case RTWS_COND_GET:
				rcu_torture_writer_state = RTWS_COND_GET;
				gp_snap = cur_ops->get_state();
				i = torture_random(&rand) % 16;
				if (i != 0)
					schedule_timeout_interruptible(i);
				udelay(torture_random(&rand) % 1000);
				rcu_torture_writer_state = RTWS_COND_SYNC;
				cur_ops->cond_sync(gp_snap);
				rcu_torture_pipe_update(old_rp);
				break;
			case RTWS_SYNC:
				rcu_torture_writer_state = RTWS_SYNC;
				cur_ops->sync();
				rcu_torture_pipe_update(old_rp);
				break;
			default:
				WARN_ON_ONCE(1);
				break;
			}
		}
		rcutorture_record_progress(++rcu_torture_current_version);
		/* Cycle through nesting levels of rcu_expedite_gp() calls. */
		if (can_expedite &&
		    !(torture_random(&rand) & 0xff & (!!expediting - 1))) {
			WARN_ON_ONCE(expediting == 0 && rcu_gp_is_expedited());
			if (expediting >= 0)
				rcu_expedite_gp();
			else
				rcu_unexpedite_gp();
			if (++expediting > 3)
				expediting = -expediting;
		}
		rcu_torture_writer_state = RTWS_STUTTER;
		stutter_wait("rcu_torture_writer");
	} while (!torture_must_stop());
	/* Reset expediting back to unexpedited. */
	if (expediting > 0)
		expediting = -expediting;
	while (can_expedite && expediting++ < 0)
		rcu_unexpedite_gp();
	WARN_ON_ONCE(can_expedite && rcu_gp_is_expedited());
	rcu_torture_writer_state = RTWS_STOPPING;
	torture_kthread_stopping("rcu_torture_writer");
	return 0;
}

/*
 * RCU torture fake writer kthread.  Repeatedly calls sync, with a random
 * delay between calls.
 */
static int
rcu_torture_fakewriter(void *arg)
{
	DEFINE_TORTURE_RANDOM(rand);

	VERBOSE_TOROUT_STRING("rcu_torture_fakewriter task started");
	set_user_nice(current, MAX_NICE);

	do {
		schedule_timeout_uninterruptible(1 + torture_random(&rand)%10);
		udelay(torture_random(&rand) & 0x3ff);
		if (cur_ops->cb_barrier != NULL &&
		    torture_random(&rand) % (nfakewriters * 8) == 0) {
			cur_ops->cb_barrier();
		} else if (gp_normal == gp_exp) {
			if (torture_random(&rand) & 0x80)
				cur_ops->sync();
			else
				cur_ops->exp_sync();
		} else if (gp_normal) {
			cur_ops->sync();
		} else {
			cur_ops->exp_sync();
		}
		stutter_wait("rcu_torture_fakewriter");
	} while (!torture_must_stop());

	torture_kthread_stopping("rcu_torture_fakewriter");
	return 0;
}

static void rcutorture_trace_dump(void)
{
	static atomic_t beenhere = ATOMIC_INIT(0);

	if (atomic_read(&beenhere))
		return;
	if (atomic_xchg(&beenhere, 1) != 0)
		return;
	ftrace_dump(DUMP_ALL);
}

/*
 * RCU torture reader from timer handler.  Dereferences rcu_torture_current,
 * incrementing the corresponding element of the pipeline array.  The
 * counter in the element should never be greater than 1, otherwise, the
 * RCU implementation is broken.
 */
static void rcu_torture_timer(unsigned long unused)
{
	int idx;
	unsigned long started;
	unsigned long completed;
	static DEFINE_TORTURE_RANDOM(rand);
	static DEFINE_SPINLOCK(rand_lock);
	struct rcu_torture *p;
	int pipe_count;
	unsigned long long ts;

	idx = cur_ops->readlock();
	if (cur_ops->started)
		started = cur_ops->started();
	else
		started = cur_ops->completed();
	ts = rcu_trace_clock_local();
	p = rcu_dereference_check(rcu_torture_current,
				  rcu_read_lock_bh_held() ||
				  rcu_read_lock_sched_held() ||
				  srcu_read_lock_held(srcu_ctlp) ||
				  torturing_tasks());
	if (p == NULL) {
		/* Leave because rcu_torture_writer is not yet underway */
		cur_ops->readunlock(idx);
		return;
	}
	if (p->rtort_mbtest == 0)
		atomic_inc(&n_rcu_torture_mberror);
	spin_lock(&rand_lock);
	cur_ops->read_delay(&rand);
	n_rcu_torture_timers++;
	spin_unlock(&rand_lock);
	preempt_disable();
	pipe_count = p->rtort_pipe_count;
	if (pipe_count > RCU_TORTURE_PIPE_LEN) {
		/* Should not happen, but... */
		pipe_count = RCU_TORTURE_PIPE_LEN;
	}
	completed = cur_ops->completed();
	if (pipe_count > 1) {
		do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu, ts,
					  started, completed);
		rcutorture_trace_dump();
	}
	__this_cpu_inc(rcu_torture_count[pipe_count]);
	completed = completed - started;
	if (cur_ops->started)
		completed++;
	if (completed > RCU_TORTURE_PIPE_LEN) {
		/* Should not happen, but... */
		completed = RCU_TORTURE_PIPE_LEN;
	}
	__this_cpu_inc(rcu_torture_batch[completed]);
	preempt_enable();
	cur_ops->readunlock(idx);
}

/*
 * RCU torture reader kthread.  Repeatedly dereferences rcu_torture_current,
 * incrementing the corresponding element of the pipeline array.  The
 * counter in the element should never be greater than 1, otherwise, the
 * RCU implementation is broken.
 */
static int
rcu_torture_reader(void *arg)
{
	unsigned long started;
	unsigned long completed;
	int idx;
	DEFINE_TORTURE_RANDOM(rand);
	struct rcu_torture *p;
	int pipe_count;
	struct timer_list t;
	unsigned long long ts;

	VERBOSE_TOROUT_STRING("rcu_torture_reader task started");
	set_user_nice(current, MAX_NICE);
	if (irqreader && cur_ops->irq_capable)
		setup_timer_on_stack(&t, rcu_torture_timer, 0);

	do {
		if (irqreader && cur_ops->irq_capable) {
			if (!timer_pending(&t))
				mod_timer(&t, jiffies + 1);
		}
		idx = cur_ops->readlock();
		if (cur_ops->started)
			started = cur_ops->started();
		else
			started = cur_ops->completed();
		ts = rcu_trace_clock_local();
		p = rcu_dereference_check(rcu_torture_current,
					  rcu_read_lock_bh_held() ||
					  rcu_read_lock_sched_held() ||
					  srcu_read_lock_held(srcu_ctlp) ||
					  torturing_tasks());
		if (p == NULL) {
			/* Wait for rcu_torture_writer to get underway */
			cur_ops->readunlock(idx);
			schedule_timeout_interruptible(HZ);
			continue;
		}
		if (p->rtort_mbtest == 0)
			atomic_inc(&n_rcu_torture_mberror);
		cur_ops->read_delay(&rand);
		preempt_disable();
		pipe_count = p->rtort_pipe_count;
		if (pipe_count > RCU_TORTURE_PIPE_LEN) {
			/* Should not happen, but... */
			pipe_count = RCU_TORTURE_PIPE_LEN;
		}
		completed = cur_ops->completed();
		if (pipe_count > 1) {
			do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu,
						  ts, started, completed);
			rcutorture_trace_dump();
		}
		__this_cpu_inc(rcu_torture_count[pipe_count]);
		completed = completed - started;
		if (cur_ops->started)
			completed++;
		if (completed > RCU_TORTURE_PIPE_LEN) {
			/* Should not happen, but... */
			completed = RCU_TORTURE_PIPE_LEN;
		}
		__this_cpu_inc(rcu_torture_batch[completed]);
		preempt_enable();
		cur_ops->readunlock(idx);
		stutter_wait("rcu_torture_reader");
	} while (!torture_must_stop());
	if (irqreader && cur_ops->irq_capable) {
		del_timer_sync(&t);
		destroy_timer_on_stack(&t);
	}
	torture_kthread_stopping("rcu_torture_reader");
	return 0;
}

/*
 * Print torture statistics.  Caller must ensure that there is only
 * one call to this function at a given time!!!  This is normally
 * accomplished by relying on the module system to only have one copy
 * of the module loaded, and then by giving the rcu_torture_stats
 * kthread full control (or the init/cleanup functions when rcu_torture_stats
 * thread is not running).
 */
static void
rcu_torture_stats_print(void)
{
	int cpu;
	int i;
	long pipesummary[RCU_TORTURE_PIPE_LEN + 1] = { 0 };
	long batchsummary[RCU_TORTURE_PIPE_LEN + 1] = { 0 };
	static unsigned long rtcv_snap = ULONG_MAX;

	for_each_possible_cpu(cpu) {
		for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
			pipesummary[i] += per_cpu(rcu_torture_count, cpu)[i];
			batchsummary[i] += per_cpu(rcu_torture_batch, cpu)[i];
		}
	}
	for (i = RCU_TORTURE_PIPE_LEN - 1; i >= 0; i--) {
		if (pipesummary[i] != 0)
			break;
	}

	pr_alert("%s%s ", torture_type, TORTURE_FLAG);
	pr_cont("rtc: %p ver: %lu tfle: %d rta: %d rtaf: %d rtf: %d ",
		rcu_torture_current,
		rcu_torture_current_version,
		list_empty(&rcu_torture_freelist),
		atomic_read(&n_rcu_torture_alloc),
		atomic_read(&n_rcu_torture_alloc_fail),
		atomic_read(&n_rcu_torture_free));
	pr_cont("rtmbe: %d rtbke: %ld rtbre: %ld ",
		atomic_read(&n_rcu_torture_mberror),
		n_rcu_torture_boost_ktrerror,
		n_rcu_torture_boost_rterror);
	pr_cont("rtbf: %ld rtb: %ld nt: %ld ",
		n_rcu_torture_boost_failure,
		n_rcu_torture_boosts,
		n_rcu_torture_timers);
	torture_onoff_stats();
	pr_cont("barrier: %ld/%ld:%ld ",
		n_barrier_successes,
		n_barrier_attempts,
		n_rcu_torture_barrier_error);
	pr_cont("cbflood: %ld\n", atomic_long_read(&n_cbfloods));

	pr_alert("%s%s ", torture_type, TORTURE_FLAG);
	if (atomic_read(&n_rcu_torture_mberror) != 0 ||
	    n_rcu_torture_barrier_error != 0 ||
	    n_rcu_torture_boost_ktrerror != 0 ||
	    n_rcu_torture_boost_rterror != 0 ||
	    n_rcu_torture_boost_failure != 0 ||
	    i > 1) {
		pr_cont("%s", "!!! ");
		atomic_inc(&n_rcu_torture_error);
		WARN_ON_ONCE(1);
	}
	pr_cont("Reader Pipe: ");
	for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++)
		pr_cont(" %ld", pipesummary[i]);
	pr_cont("\n");

	pr_alert("%s%s ", torture_type, TORTURE_FLAG);
	pr_cont("Reader Batch: ");
	for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++)
		pr_cont(" %ld", batchsummary[i]);
	pr_cont("\n");

	pr_alert("%s%s ", torture_type, TORTURE_FLAG);
	pr_cont("Free-Block Circulation: ");
	for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
		pr_cont(" %d", atomic_read(&rcu_torture_wcount[i]));
	}
	pr_cont("\n");

	if (cur_ops->stats)
		cur_ops->stats();
	if (rtcv_snap == rcu_torture_current_version &&
	    rcu_torture_current != NULL) {
		int __maybe_unused flags;
		unsigned long __maybe_unused gpnum;
		unsigned long __maybe_unused completed;

		rcutorture_get_gp_data(cur_ops->ttype,
				       &flags, &gpnum, &completed);
		pr_alert("??? Writer stall state %s(%d) g%lu c%lu f%#x\n",
			 rcu_torture_writer_state_getname(),
			 rcu_torture_writer_state,
			 gpnum, completed, flags);
		show_rcu_gp_kthreads();
		rcutorture_trace_dump();
	}
	rtcv_snap = rcu_torture_current_version;
}

/*
 * Periodically prints torture statistics, if periodic statistics printing
 * was specified via the stat_interval module parameter.
 */
static int
rcu_torture_stats(void *arg)
{
	VERBOSE_TOROUT_STRING("rcu_torture_stats task started");
	do {
		schedule_timeout_interruptible(stat_interval * HZ);
		rcu_torture_stats_print();
		torture_shutdown_absorb("rcu_torture_stats");
	} while (!torture_must_stop());
	torture_kthread_stopping("rcu_torture_stats");
	return 0;
}

static inline void
rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, const char *tag)
{
	pr_alert("%s" TORTURE_FLAG
		 "--- %s: nreaders=%d nfakewriters=%d "
		 "stat_interval=%d verbose=%d test_no_idle_hz=%d "
		 "shuffle_interval=%d stutter=%d irqreader=%d "
		 "fqs_duration=%d fqs_holdoff=%d fqs_stutter=%d "
		 "test_boost=%d/%d test_boost_interval=%d "
		 "test_boost_duration=%d shutdown_secs=%d "
		 "stall_cpu=%d stall_cpu_holdoff=%d "
		 "n_barrier_cbs=%d "
		 "onoff_interval=%d onoff_holdoff=%d\n",
		 torture_type, tag, nrealreaders, nfakewriters,
		 stat_interval, verbose, test_no_idle_hz, shuffle_interval,
		 stutter, irqreader, fqs_duration, fqs_holdoff, fqs_stutter,
		 test_boost, cur_ops->can_boost,
		 test_boost_interval, test_boost_duration, shutdown_secs,
		 stall_cpu, stall_cpu_holdoff,
		 n_barrier_cbs,
		 onoff_interval, onoff_holdoff);
}

static void rcutorture_booster_cleanup(int cpu)
{
	struct task_struct *t;

	if (boost_tasks[cpu] == NULL)
		return;
	mutex_lock(&boost_mutex);
	t = boost_tasks[cpu];
	boost_tasks[cpu] = NULL;
	mutex_unlock(&boost_mutex);

	/* This must be outside of the mutex, otherwise deadlock! */
	torture_stop_kthread(rcu_torture_boost, t);
}

static int rcutorture_booster_init(int cpu)
{
	int retval;

	if (boost_tasks[cpu] != NULL)
		return 0;  /* Already created, nothing more to do. */

	/* Don't allow time recalculation while creating a new task. */
	mutex_lock(&boost_mutex);
	VERBOSE_TOROUT_STRING("Creating rcu_torture_boost task");
	boost_tasks[cpu] = kthread_create_on_node(rcu_torture_boost, NULL,
						  cpu_to_node(cpu),
						  "rcu_torture_boost");
	if (IS_ERR(boost_tasks[cpu])) {
		retval = PTR_ERR(boost_tasks[cpu]);
		VERBOSE_TOROUT_STRING("rcu_torture_boost task create failed");
		n_rcu_torture_boost_ktrerror++;
		boost_tasks[cpu] = NULL;
		mutex_unlock(&boost_mutex);
		return retval;
	}
	kthread_bind(boost_tasks[cpu], cpu);
	wake_up_process(boost_tasks[cpu]);
	mutex_unlock(&boost_mutex);
	return 0;
}

/*
 * CPU-stall kthread.  It waits as specified by stall_cpu_holdoff, then
 * induces a CPU stall for the time specified by stall_cpu.
 */
static int rcu_torture_stall(void *args)
{
	unsigned long stop_at;

	VERBOSE_TOROUT_STRING("rcu_torture_stall task started");
	if (stall_cpu_holdoff > 0) {
		VERBOSE_TOROUT_STRING("rcu_torture_stall begin holdoff");
		schedule_timeout_interruptible(stall_cpu_holdoff * HZ);
		VERBOSE_TOROUT_STRING("rcu_torture_stall end holdoff");
	}
	if (!kthread_should_stop()) {
		stop_at = get_seconds() + stall_cpu;
		/* RCU CPU stall is expected behavior in following code. */
		pr_alert("rcu_torture_stall start.\n");
		rcu_read_lock();
		preempt_disable();
		while (ULONG_CMP_LT(get_seconds(), stop_at))
			continue;  /* Induce RCU CPU stall warning. */
		preempt_enable();
		rcu_read_unlock();
		pr_alert("rcu_torture_stall end.\n");
	}
	torture_shutdown_absorb("rcu_torture_stall");
	while (!kthread_should_stop())
		schedule_timeout_interruptible(10 * HZ);
	return 0;
}

/* Spawn CPU-stall kthread, if stall_cpu specified. */
static int __init rcu_torture_stall_init(void)
{
	if (stall_cpu <= 0)
		return 0;
	return torture_create_kthread(rcu_torture_stall, NULL, stall_task);
}

/* Callback function for RCU barrier testing. */
static void rcu_torture_barrier_cbf(struct rcu_head *rcu)
{
	atomic_inc(&barrier_cbs_invoked);
}

/* kthread function to register callbacks used to test RCU barriers. */
static int rcu_torture_barrier_cbs(void *arg)
{
	long myid = (long)arg;
	bool lastphase = 0;
	bool newphase;
	struct rcu_head rcu;

	init_rcu_head_on_stack(&rcu);
	VERBOSE_TOROUT_STRING("rcu_torture_barrier_cbs task started");
	set_user_nice(current, MAX_NICE);
	do {
		wait_event(barrier_cbs_wq[myid],
			   (newphase =
			    smp_load_acquire(&barrier_phase)) != lastphase ||
			   torture_must_stop());
		lastphase = newphase;
		if (torture_must_stop())
			break;
		/*
		 * The above smp_load_acquire() ensures barrier_phase load
		 * is ordered before the folloiwng ->call().
		 */
		cur_ops->call(&rcu, rcu_torture_barrier_cbf);
		if (atomic_dec_and_test(&barrier_cbs_count))
			wake_up(&barrier_wq);
	} while (!torture_must_stop());
	if (cur_ops->cb_barrier != NULL)
		cur_ops->cb_barrier();
	destroy_rcu_head_on_stack(&rcu);
	torture_kthread_stopping("rcu_torture_barrier_cbs");
	return 0;
}

/* kthread function to drive and coordinate RCU barrier testing. */
static int rcu_torture_barrier(void *arg)
{
	int i;

	VERBOSE_TOROUT_STRING("rcu_torture_barrier task starting");
	do {
		atomic_set(&barrier_cbs_invoked, 0);
		atomic_set(&barrier_cbs_count, n_barrier_cbs);
		/* Ensure barrier_phase ordered after prior assignments. */
		smp_store_release(&barrier_phase, !barrier_phase);
		for (i = 0; i < n_barrier_cbs; i++)
			wake_up(&barrier_cbs_wq[i]);
		wait_event(barrier_wq,
			   atomic_read(&barrier_cbs_count) == 0 ||
			   torture_must_stop());
		if (torture_must_stop())
			break;
		n_barrier_attempts++;
		cur_ops->cb_barrier(); /* Implies smp_mb() for wait_event(). */
		if (atomic_read(&barrier_cbs_invoked) != n_barrier_cbs) {
			n_rcu_torture_barrier_error++;
			pr_err("barrier_cbs_invoked = %d, n_barrier_cbs = %d\n",
			       atomic_read(&barrier_cbs_invoked),
			       n_barrier_cbs);
			WARN_ON_ONCE(1);
		}
		n_barrier_successes++;
		schedule_timeout_interruptible(HZ / 10);
	} while (!torture_must_stop());
	torture_kthread_stopping("rcu_torture_barrier");
	return 0;
}

/* Initialize RCU barrier testing. */
static int rcu_torture_barrier_init(void)
{
	int i;
	int ret;

	if (n_barrier_cbs <= 0)
		return 0;
	if (cur_ops->call == NULL || cur_ops->cb_barrier == NULL) {
		pr_alert("%s" TORTURE_FLAG
			 " Call or barrier ops missing for %s,\n",
			 torture_type, cur_ops->name);
		pr_alert("%s" TORTURE_FLAG
			 " RCU barrier testing omitted from run.\n",
			 torture_type);
		return 0;
	}
	atomic_set(&barrier_cbs_count, 0);
	atomic_set(&barrier_cbs_invoked, 0);
	barrier_cbs_tasks =
		kzalloc(n_barrier_cbs * sizeof(barrier_cbs_tasks[0]),
			GFP_KERNEL);
	barrier_cbs_wq =
		kzalloc(n_barrier_cbs * sizeof(barrier_cbs_wq[0]),
			GFP_KERNEL);
	if (barrier_cbs_tasks == NULL || !barrier_cbs_wq)
		return -ENOMEM;
	for (i = 0; i < n_barrier_cbs; i++) {
		init_waitqueue_head(&barrier_cbs_wq[i]);
		ret = torture_create_kthread(rcu_torture_barrier_cbs,
					     (void *)(long)i,
					     barrier_cbs_tasks[i]);
		if (ret)
			return ret;
	}
	return torture_create_kthread(rcu_torture_barrier, NULL, barrier_task);
}

/* Clean up after RCU barrier testing. */
static void rcu_torture_barrier_cleanup(void)
{
	int i;

	torture_stop_kthread(rcu_torture_barrier, barrier_task);
	if (barrier_cbs_tasks != NULL) {
		for (i = 0; i < n_barrier_cbs; i++)
			torture_stop_kthread(rcu_torture_barrier_cbs,
					     barrier_cbs_tasks[i]);
		kfree(barrier_cbs_tasks);
		barrier_cbs_tasks = NULL;
	}
	if (barrier_cbs_wq != NULL) {
		kfree(barrier_cbs_wq);
		barrier_cbs_wq = NULL;
	}
}

static int rcutorture_cpu_notify(struct notifier_block *self,
				 unsigned long action, void *hcpu)
{
	long cpu = (long)hcpu;

	switch (action) {
	case CPU_ONLINE:
	case CPU_DOWN_FAILED:
		(void)rcutorture_booster_init(cpu);
		break;
	case CPU_DOWN_PREPARE:
		rcutorture_booster_cleanup(cpu);
		break;
	default:
		break;
	}
	return NOTIFY_OK;
}

static struct notifier_block rcutorture_cpu_nb = {
	.notifier_call = rcutorture_cpu_notify,
};

static void
rcu_torture_cleanup(void)
{
	int i;

	rcutorture_record_test_transition();
	if (torture_cleanup_begin()) {
		if (cur_ops->cb_barrier != NULL)
			cur_ops->cb_barrier();
		return;
	}

	rcu_torture_barrier_cleanup();
	torture_stop_kthread(rcu_torture_stall, stall_task);
	torture_stop_kthread(rcu_torture_writer, writer_task);

	if (reader_tasks) {
		for (i = 0; i < nrealreaders; i++)
			torture_stop_kthread(rcu_torture_reader,
					     reader_tasks[i]);
		kfree(reader_tasks);
	}
	rcu_torture_current = NULL;

	if (fakewriter_tasks) {
		for (i = 0; i < nfakewriters; i++) {
			torture_stop_kthread(rcu_torture_fakewriter,
					     fakewriter_tasks[i]);
		}
		kfree(fakewriter_tasks);
		fakewriter_tasks = NULL;
	}

	torture_stop_kthread(rcu_torture_stats, stats_task);
	torture_stop_kthread(rcu_torture_fqs, fqs_task);
	for (i = 0; i < ncbflooders; i++)
		torture_stop_kthread(rcu_torture_cbflood, cbflood_task[i]);
	if ((test_boost == 1 && cur_ops->can_boost) ||
	    test_boost == 2) {
		unregister_cpu_notifier(&rcutorture_cpu_nb);
		for_each_possible_cpu(i)
			rcutorture_booster_cleanup(i);
	}

	/*
	 * Wait for all RCU callbacks to fire, then do flavor-specific
	 * cleanup operations.
	 */
	if (cur_ops->cb_barrier != NULL)
		cur_ops->cb_barrier();
	if (cur_ops->cleanup != NULL)
		cur_ops->cleanup();

	rcu_torture_stats_print();  /* -After- the stats thread is stopped! */

	if (atomic_read(&n_rcu_torture_error) || n_rcu_torture_barrier_error)
		rcu_torture_print_module_parms(cur_ops, "End of test: FAILURE");
	else if (torture_onoff_failures())
		rcu_torture_print_module_parms(cur_ops,
					       "End of test: RCU_HOTPLUG");
	else
		rcu_torture_print_module_parms(cur_ops, "End of test: SUCCESS");
	torture_cleanup_end();
}

#ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD
static void rcu_torture_leak_cb(struct rcu_head *rhp)
{
}

static void rcu_torture_err_cb(struct rcu_head *rhp)
{
	/*
	 * This -might- happen due to race conditions, but is unlikely.
	 * The scenario that leads to this happening is that the
	 * first of the pair of duplicate callbacks is queued,
	 * someone else starts a grace period that includes that
	 * callback, then the second of the pair must wait for the
	 * next grace period.  Unlikely, but can happen.  If it
	 * does happen, the debug-objects subsystem won't have splatted.
	 */
	pr_alert("rcutorture: duplicated callback was invoked.\n");
}
#endif /* #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD */

/*
 * Verify that double-free causes debug-objects to complain, but only
 * if CONFIG_DEBUG_OBJECTS_RCU_HEAD=y.  Otherwise, say that the test
 * cannot be carried out.
 */
static void rcu_test_debug_objects(void)
{
#ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD
	struct rcu_head rh1;
	struct rcu_head rh2;

	init_rcu_head_on_stack(&rh1);
	init_rcu_head_on_stack(&rh2);
	pr_alert("rcutorture: WARN: Duplicate call_rcu() test starting.\n");

	/* Try to queue the rh2 pair of callbacks for the same grace period. */
	preempt_disable(); /* Prevent preemption from interrupting test. */
	rcu_read_lock(); /* Make it impossible to finish a grace period. */
	call_rcu(&rh1, rcu_torture_leak_cb); /* Start grace period. */
	local_irq_disable(); /* Make it harder to start a new grace period. */
	call_rcu(&rh2, rcu_torture_leak_cb);
	call_rcu(&rh2, rcu_torture_err_cb); /* Duplicate callback. */
	local_irq_enable();
	rcu_read_unlock();
	preempt_enable();

	/* Wait for them all to get done so we can safely return. */
	rcu_barrier();
	pr_alert("rcutorture: WARN: Duplicate call_rcu() test complete.\n");
	destroy_rcu_head_on_stack(&rh1);
	destroy_rcu_head_on_stack(&rh2);
#else /* #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD */
	pr_alert("rcutorture: !CONFIG_DEBUG_OBJECTS_RCU_HEAD, not testing duplicate call_rcu()\n");
#endif /* #else #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD */
}

static int __init
rcu_torture_init(void)
{
	int i;
	int cpu;
	int firsterr = 0;
	static struct rcu_torture_ops *torture_ops[] = {
		&rcu_ops, &rcu_bh_ops, &rcu_busted_ops, &srcu_ops, &srcud_ops,
		&sched_ops, RCUTORTURE_TASKS_OPS
	};

	if (!torture_init_begin(torture_type, verbose, &torture_runnable))
		return -EBUSY;

	/* Process args and tell the world that the torturer is on the job. */
	for (i = 0; i < ARRAY_SIZE(torture_ops); i++) {
		cur_ops = torture_ops[i];
		if (strcmp(torture_type, cur_ops->name) == 0)
			break;
	}
	if (i == ARRAY_SIZE(torture_ops)) {
		pr_alert("rcu-torture: invalid torture type: \"%s\"\n",
			 torture_type);
		pr_alert("rcu-torture types:");
		for (i = 0; i < ARRAY_SIZE(torture_ops); i++)
			pr_alert(" %s", torture_ops[i]->name);
		pr_alert("\n");
		firsterr = -EINVAL;
		goto unwind;
	}
	if (cur_ops->fqs == NULL && fqs_duration != 0) {
		pr_alert("rcu-torture: ->fqs NULL and non-zero fqs_duration, fqs disabled.\n");
		fqs_duration = 0;
	}
	if (cur_ops->init)
		cur_ops->init();

	if (nreaders >= 0) {
		nrealreaders = nreaders;
	} else {
		nrealreaders = num_online_cpus() - 2 - nreaders;
		if (nrealreaders <= 0)
			nrealreaders = 1;
	}
	rcu_torture_print_module_parms(cur_ops, "Start of test");

	/* Set up the freelist. */

	INIT_LIST_HEAD(&rcu_torture_freelist);
	for (i = 0; i < ARRAY_SIZE(rcu_tortures); i++) {
		rcu_tortures[i].rtort_mbtest = 0;
		list_add_tail(&rcu_tortures[i].rtort_free,
			      &rcu_torture_freelist);
	}

	/* Initialize the statistics so that each run gets its own numbers. */

	rcu_torture_current = NULL;
	rcu_torture_current_version = 0;
	atomic_set(&n_rcu_torture_alloc, 0);
	atomic_set(&n_rcu_torture_alloc_fail, 0);
	atomic_set(&n_rcu_torture_free, 0);
	atomic_set(&n_rcu_torture_mberror, 0);
	atomic_set(&n_rcu_torture_error, 0);
	n_rcu_torture_barrier_error = 0;
	n_rcu_torture_boost_ktrerror = 0;
	n_rcu_torture_boost_rterror = 0;
	n_rcu_torture_boost_failure = 0;
	n_rcu_torture_boosts = 0;
	for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++)
		atomic_set(&rcu_torture_wcount[i], 0);
	for_each_possible_cpu(cpu) {
		for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
			per_cpu(rcu_torture_count, cpu)[i] = 0;
			per_cpu(rcu_torture_batch, cpu)[i] = 0;
		}
	}

	/* Start up the kthreads. */

	firsterr = torture_create_kthread(rcu_torture_writer, NULL,
					  writer_task);
	if (firsterr)
		goto unwind;
	if (nfakewriters > 0) {
		fakewriter_tasks = kzalloc(nfakewriters *
					   sizeof(fakewriter_tasks[0]),
					   GFP_KERNEL);
		if (fakewriter_tasks == NULL) {
			VERBOSE_TOROUT_ERRSTRING("out of memory");
			firsterr = -ENOMEM;
			goto unwind;
		}
	}
	for (i = 0; i < nfakewriters; i++) {
		firsterr = torture_create_kthread(rcu_torture_fakewriter,
						  NULL, fakewriter_tasks[i]);
		if (firsterr)
			goto unwind;
	}
	reader_tasks = kzalloc(nrealreaders * sizeof(reader_tasks[0]),
			       GFP_KERNEL);
	if (reader_tasks == NULL) {
		VERBOSE_TOROUT_ERRSTRING("out of memory");
		firsterr = -ENOMEM;
		goto unwind;
	}
	for (i = 0; i < nrealreaders; i++) {
		firsterr = torture_create_kthread(rcu_torture_reader, NULL,
						  reader_tasks[i]);
		if (firsterr)
			goto unwind;
	}
	if (stat_interval > 0) {
		firsterr = torture_create_kthread(rcu_torture_stats, NULL,
						  stats_task);
		if (firsterr)
			goto unwind;
	}
	if (test_no_idle_hz && shuffle_interval > 0) {
		firsterr = torture_shuffle_init(shuffle_interval * HZ);
		if (firsterr)
			goto unwind;
	}
	if (stutter < 0)
		stutter = 0;
	if (stutter) {
		firsterr = torture_stutter_init(stutter * HZ);
		if (firsterr)
			goto unwind;
	}
	if (fqs_duration < 0)
		fqs_duration = 0;
	if (fqs_duration) {
		/* Create the fqs thread */
		firsterr = torture_create_kthread(rcu_torture_fqs, NULL,
						  fqs_task);
		if (firsterr)
			goto unwind;
	}
	if (test_boost_interval < 1)
		test_boost_interval = 1;
	if (test_boost_duration < 2)
		test_boost_duration = 2;
	if ((test_boost == 1 && cur_ops->can_boost) ||
	    test_boost == 2) {

		boost_starttime = jiffies + test_boost_interval * HZ;
		register_cpu_notifier(&rcutorture_cpu_nb);
		for_each_possible_cpu(i) {
			if (cpu_is_offline(i))
				continue;  /* Heuristic: CPU can go offline. */
			firsterr = rcutorture_booster_init(i);
			if (firsterr)
				goto unwind;
		}
	}
	firsterr = torture_shutdown_init(shutdown_secs, rcu_torture_cleanup);
	if (firsterr)
		goto unwind;
	firsterr = torture_onoff_init(onoff_holdoff * HZ, onoff_interval * HZ);
	if (firsterr)
		goto unwind;
	firsterr = rcu_torture_stall_init();
	if (firsterr)
		goto unwind;
	firsterr = rcu_torture_barrier_init();
	if (firsterr)
		goto unwind;
	if (object_debug)
		rcu_test_debug_objects();
	if (cbflood_n_burst > 0) {
		/* Create the cbflood threads */
		ncbflooders = (num_online_cpus() + 3) / 4;
		cbflood_task = kcalloc(ncbflooders, sizeof(*cbflood_task),
				       GFP_KERNEL);
		if (!cbflood_task) {
			VERBOSE_TOROUT_ERRSTRING("out of memory");
			firsterr = -ENOMEM;
			goto unwind;
		}
		for (i = 0; i < ncbflooders; i++) {
			firsterr = torture_create_kthread(rcu_torture_cbflood,
							  NULL,
							  cbflood_task[i]);
			if (firsterr)
				goto unwind;
		}
	}
	rcutorture_record_test_transition();
	torture_init_end();
	return 0;

unwind:
	torture_init_end();
	rcu_torture_cleanup();
	return firsterr;
}

module_init(rcu_torture_init);
module_exit(rcu_torture_cleanup);


text:
I Do My Swingin' at Home
On May 24, 2021 May 24, 2021 By jbIn Record Charts
(Pictured: This much cool will give you frostbite: Johnny Cash, Merle Haggard, Buck Owens, and Glen Campbell.)
You asked for it, now you have to read it.
I experienced the country music of the mid-70s somewhat directly. It was an era when WMAQ in Chicago became a sensation by programming country music with Top 40 formatics (and even employed Chicago legend Fred Winston for a while). Mother and Dad listened to it in the house, the barn, and the car, and I recall turning it on myself.
The country music of the years before is a different story. What I picked up I got by osmosis or heard in years after, including some songs from the Billboard country chart from May 16, 1970.
1. "My Love"/Sonny James. There is a long list of one-time country superstars who are absolutely forgotten today. "The Southern Gentleman" had 23 #1 hits, 16 of them in a row between 1967 and 1971. "My Love" is a cover of the 1966 Petula Clark hit, and although it hasn't aged well, it was a big deal in its day.
2. "Is Anybody Goin' to San Antone"/Charley Pride. "Kiss an Angel Good Morning" is Charley Pride's biggest hit, but "Is Anybody Goin' to San Antone" is the Charley Pride-iest. It's everything that made him great in a couple of minutes.
3. "I Do My Swingin' at Home"/David Houston. Here's another guy who, like Sonny James, was straight money for several years, with an eye-popping record of chart success. In 1966, "Almost Persuaded" had a run at #1 country not beaten until the download era, but today, it's the only Houston hit people remember now, if any.
5. "What Is Truth"/Johnny Cash
9. "Hello Darlin'"/Conway Twitty
11. "Tennessee Birdwalk"/Jack Blanchard and Misty Morgan
12. "My Woman My Woman My Wife"/Marty Robbins
60. "Everything Is Beautiful"/Ray Stevens
62. "Long Lonesome Highway"/Michael Parks
Crossovers from country to pop and back again have always been a thing. "Everything Is Beautiful" would top the Hot 100 as May turned to June. "My Woman, My Woman, My Wife" made #42. I wrote about it a few years ago. "Hello Darlin'" made #60 but was Twitty's longest-running country #1. You don't need to hear me bang on about "Tennessee Birdwalk" again.
10. "Rise and Shine"/Tommy Cash. Younger brother of Johnny, and with a modestly successful career of his own during the 70s.
26. "Oh Happy Day"/Glen Campbell
32. "All I Have to Do Is Dream"/Bobbie Gentry and Glen Campbell
America was at peak Glen Campbell in 1970; his TV show was a hit and his records were ubiquitous. Campbell and Gentry did two Everly Brothers covers, this one and "Let It Be Me," both of which crossed over from country to pop, and theirs might be the first version of "All I Have to Do Is Dream" I ever knew. "Oh Happy Day" ran the country chart at about the same time the gospel version by the Edwin Hawkins Singers was climbing into the Top 10 of the Hot 100.
35. "Togetherness"/Buck Owens and Susan Raye
38. "Tomorrow's Forever"/Porter Wagoner and Dolly Parton
47. "Pickin' Wild Mountain Berries"/Kenny Vernon and Lawanda Lindsay
58. "I'm Leavin' It Up to You"/Johnny and Jonie Mosby
67. "A Good Thing"/Bill Wilbourne and Kathy Morrison
Bobbie Gentry and Glen Campbell were established solo stars who got together. Owens and Wagoner were established stars who took on duet partners, while other duets came up as duets. Dolly's solo career began while she was partnered with Wagoner. Raye and Lindsay, who appeared on Owens' TV show Hee Haw, scored their own hits later on. Raye had five straight country Top-10 hits between 1970 and 1972, including "L.A. International Airport," which went to #54 on the Hot 100.
("Pickin' Wild Mountain Berries," first recorded by R&B singers Peggy Scott and Jo Jo Benson and more famously by Twitty and Loretta Lynn in 1971, is not really about procuring fruit.)
50. "Down in New Orleans"/Buddy Alan. Buddy Alan was the son of Buck and Bonnie Owens and the stepson of Merle Haggard. After a handful of minor hits in the 70s, he gave up recording for a successful career in radio programming.
53. "Running Bare"/Jim Nesbitt. In 1960, Johnny Preston scored a #1 pop hit with "Running Bear," about an Indian brave who "loved little White Dove with a love big as the sky." Sonny James took it to #1 country in 1969. After that, Jim Nesbitt (whose name we have mentioned at this website before) did "Running Bare," a parody that in retrospect seems inevitable.
Our pal Bean Baxter pointed out on Twitter the other day that a large amount of 70s country is out of print and/or missing from streaming services. That's a great loss to history geeks such as we, but also to people who simply enjoy good tunes.
God's Gonna Getcha for That
Fab Funny
12 thoughts on "I Do My Swingin' at Home"
mikehagerty
I always think I don't know much Country music, but then along comes a post like this to remind me that's not true. I wouldn't miss Johnny Cash or Glen Campbell's TV shows and KIBS in Bishop was block programmed, with Country from 6-9 every morning. In a one-station town, that means you've gotta listen to get the news, weather, school lunch menus and the like.
And this reminds me that I even played some, beyond the crossover stuff, because I filled in on the morning show when I got my first job at KIBS….and come to think of it, my morning show at KUKI in Ukiah was interrupted every morning at 7:30 for a half-hour of Country sponsored by Redwood Ford.
If you'd asked me at the time, I'd probably have told you I disliked Country music—and hope no one noticed my irrational love for "The End Is Not In Sight" by the Amazing Rhythm Aces, or a few years later, for Don Williams' "Falling Again".
Thanks for these postings. I grew up listening to country music in the 70''s. That is when my father was controlling the radio, driving in the car, backyard BBQ's, etc. My father would say he liked both kinds of music… country and western. :-)
In my room and hanging out with friends on the sidewalk, where I controlled the radio, it was Top 40, Casey Kasem etc.
Turning 16 in 1980, I found myself listening to both genres plus my own cassette library. I love 80's country even more than 70's country , yet it's the reverse for Top 40 music.
Loving these posts, brings back lots of memories.
"What is Truth" is both one of Johnny Cash's best hits and I'd argue one of the top 100 songs of 1970 quality-wise. Flexes its muscles in every department from his vocals onward. Also, I was today years old when I learned that he had a younger brother that made his mark in country as well.
I always thought it was strange that given the history, influence and constant name-checking of classic Country stars, that there is no "Oldies" country radio. Even with satellite radio it's hard to find Old Country. In Rock you have "Oldies but Goodies" and "Classic Rock". Same thing with R&B and it's various genres. Jazz stations play old-time Jazz. Even Classical stations are primarily 'Oldies". But Country music seems to want to wipe out it's own footprints.
T., the trouble with Country oldies, at least in the 90s and before, was that Country was an adult format to begin with. So, if a rock/pop/R&B oldies station plays a 30-year-old record, it's playing to a 45-50 year old. But a 30-year-old country oldie would be playing to a 60-year-old. A few stations tried "Classic Country" and hit the demographic wall fast and hard.
Classical and jazz tend to be noncomms, so demographics aren't an issue.
Alvaro Leos
"Oh Happy Day" and the "Mountain Berries" song remind us how much crossover there was between R&B and country, at least songwriting wise. Pure R&B acts like Al Green and Millie Jackson covered country hits with regularity. How many have there been in the last 25 years?
And if you're going to mention Tommy Cash, don't forget his gusty and stunning 1968 hit "Six White Horses", basically the angry flip side of "Abraham Martin and John".
I too am intrigued by the R&B/country crossover. I keep finding interesting examples, most recently I discovered Johnny Paycheck covered Paul Simon's (not R&B but closer to gospel) duet "Gone at Last" (with Phoebe Snow) and used former Rae-let Charnissa Jones as his duet partner.
briguyx
One of my hobbies over the years has been to take a music book (I started with Dave Marsh's The Heart Of Rock & Soul) and then try to collect on CD as many of the songs as I can (without spending too much). I have 700 songs of the 1001 in the Dave Marsh book. I then went on to Billboard's various Number One Hits books, including the one on country music of which I have 681 of 848 songs. Which explains why I actually own "The Best Of Jerry Wallace"…
mackdaddyg
I've often thought that if somebody did a "Nuggets" style of compilation for obscure country music from the 60s, the results could be interesting. I tend to assume that a lot of country albums have the hit or two plus filler, but I'm pretty sure that I'm wrong.
I thank everybody for their interesting comments here. "Classic country" will continue to exist as a streaming or satellite format, but it doesn't have much of a future on terrestrial radio, I fear. We had one in our group for a while, but it gradually dropped the 60s/70s stuff, and on those rare occasions when I hear it now, it's playing stuff from the early 00s. Mainstream country radio is even more dismissive of its past. While some stations are exceptions, the general run of them are playing almost exclusively stuff from the last six or eight years. Mainstream country songs do a lot of name-checking of Hank and Merle, but it's a lifestyle signifier. Nobody–NOBODY–who's listening to mainstream country radio in 2021 is listening to Hank and Merle too.
For what it's worth, there's a local station that calls itself "Mid Century Radio" and I'm assuming it's a satellite feed although they have a local dj in the morning. They play a lot of 50s and 60s rock and r&b (heard the Clovers' "Nip Sip" just a few minutes ago), but every fourth song is a country tune from the same time period.
It ain't completely dead and gone from terrestrial radio, but it sure is getting harder to find.
My go-to terrestrial station for pre-Garth Brooks classic country is WVAL in Sauk Rapids/St. Cloud, MN, one of the sister stations to Album Rock The Goat/WXYG, which jb has mentioned previously. I love it when WVAL stumps me with songs I played during my country radio days, but haven't heard in 30+ years. Once in awhile, they'll even play original top-40 versions of hits that later became big country smashes, such as B.W. Stevenson's version of "My Maria".
WVAL has been doing country since it signed on in 1963 as a 250-watt daytimer on AM 800. Now they have an FM translator, as well as ten billion other ways to listen: http://www.800wval.com/
Or take the easy way out and bookmark:
http://ice5.securenetsystems.net/WVAL
Leave a Reply to Alvaro Leos Cancel reply

redpajama_set_name: RedPajamaCommonCrawl


A versatile Indian singer based in Delhi. Her melodious voice and perfect diction captivate audiences across age groups, genres, and geographies.
Her music is emotive, expressive and soulful. Over the years she has carved out a niche for herself as an accomplished Sufi and ghazal singer. Rashmi is the first and only Indian woman to win the Grand-Prix Award at the prestigious IX International World Music Festival 'Sharq Taronalari' (Melodies of Orient) in August 2013 at Samarkand, Uzbekistan, organized by UNESCO. She has performed at various national and international concerts including in the USA, UK, Indonesia, Uzbekistan, Turkmenistan, Australia. A post-graduate in Hindustani classical music, she has trained under Gurus like Smt. Kamala Bose in Allahabad, Smt. Savita Devi in Delhi for Thumri-Dadra, and Smt. Shanti Hiranand for ghazal gayaki.


text:
Real Estate Listings: Business Directory Punjab Lahore
Newly listed Sort
Select sorting
HH Company |Graphic design, SEO and writing services.
HH Company is a best graphic design, SEO and writing services provider. HH Company has reputation in providing high quality services. [email protected] https://seogoodwork.com/ phone +92-309-4621846.
Lahore in Punjab (Pakistan), 54000
Published by habib
Check with seller
view Business Directory published 2 years ago
Business Directory in Lahore, Punjab
Select a categoryResidential homes Houses Apartments Flats Rooms Townhouses HomesLand lots Residential LandCommercial Real Estate Hotels Office spacesAll Others Real Estate All Others Real EstateBusiness Directory Moving Companies Design Services Insurance ServicesReal Estate Agent Directory Real Estate Consultancy
Any transaction
Any number of bedrooms
Choose number of bedrooms
Any number of bathrooms
Choose number of bathrooms
Any age
1 month old
Subscribe to alert
Free service, you can easily unsubscribe at any time. By clicking Subscribe you agree to the TOS and the Privacy Policy
Browse Business Directory in Lahore, Punjab or list your own. Advertise, sell your property, list it for let
Lahore (; Punjabi: لہور; Urdu: لاہور, pronounced [laːˈɦɔːr]) is the capital of the Pakistani province of Punjab. It is the country's 2nd largest city after Karachi and 18th largest city proper in the world. Lahore is one of Pakistan's wealthiest cities, with an estimated GDP of $84 billion (PPP) as of 2019. Lahore is the largest city and historic cultural centre of the wider Punjab region, and is one of Pakistan's most socially liberal, progressive, and cosmopolitan cities.Lahore's origins reach into antiquity. The city has been controlled by numerous empires throughout the course of its history, including the Hindu Shahis, Ghaznavids, Ghurids, and Delhi Sultanate by the medieval era. Lahore reached the height of its splendour under the Mughal Empire between the late 16th and early 18th century, and served as its capital city for a number of years. The city was captured by the forces of the Afsharid ruler Nader Shah in 1739, and fell into a period of decay while being contested between the Afghans and the Sikhs. Lahore eventually became capital of the Sikh Empire in the early 19th century, and regained some of its lost grandeur. Lahore was then annexed to the British Empire, and made capital of British Punjab. Lahore was central to the independence movements of both India and Pakistan, with the city being the site of both the declaration of Indian Independence, and the resolution calling for the establishment of Pakistan. Lahore experienced some of the worst rioting during the Partition period preceding Pakistan's independence. Following the success of the Pakistan Movement and subsequent independence in 1947, Lahore was declared capital of Pakistan's Punjab province. Lahore exerts a strong cultural influence over Pakistan. Lahore is a major center for Pakistan's publishing industry, and remains the foremost center of Pakistan's literary scene. The city is also a major centre of education in Pakistan, with some of Pakistan's leading universities based in the city. Lahore is also home to Pakistan's film industry, Lollywood, and is a major centre of Qawwali music. The city also hosts much of Pakistan's tourist industry, with major attractions including the Walled City, the famous Badshahi and Wazir Khan mosques and Sikh shrines. Lahore is also home to the Lahore Fort and Shalimar Gardens, both of which are UNESCO World Heritage Sites.
A business directory is a website or printed listing of information which lists all businesses within some category. Businesses can be categorized by business, location, activity, or size. Business may be compiled either manually or through an automated online search software. Online yellow pages are a type of business directory, as is the traditional phone book. The details provided in a business directory varies from business to business. They may include the business name, addresses, telephone numbers, location, type of service or products the business provides, number of employees, the service region and any professional associations. Some directories include a section for user reviews, comments, and feedback. Business directories in the past would take a printed format but have recently been upgraded to websites due to the advent of the internet. Many business directories offer complimentary listings in addition to the premium options. There are many business directories and some of these have moved over to the internet and away from printed format. Whilst not being search engines, business directories often have a search facility.
Popular Searches: Mehrabadi Islamabad House For RentAgriculture Land For Sale In ChitralApartments Sale ViterboAtta 2 BedroomBungalows SalernoChapel Arm Real EstateDelano Tennessee HotelsDestruction Bay HomesDestruction Bay Real EstateFlats For Sale MurreeHotel Suites For Sale In JacobabadHouse For Sale In Sohan IslamabadHouse For Sale Mirpur Azad KashmirHouses For Sale In Mirpur Azad KashmirKuhsdorfMill City Oregon Real EstateMoving Services NayaritOakwood Ontario Real EstatePaynton Homes For SaleProperties To Rent In Bodegraven
All categoriesResidential homesLand lotsCommercial Real EstateAll Others Real EstateBusiness DirectoryReal Estate Agent Directory


text:
Florida state senator introduces 2012 session's first anti-abortion bill
State Sen. Anitere Flores, R-Miami, has introduced the first anti-abortion bill to be considered by the Florida Legislature in its 2012 session.
Senate Bill 290 aims to restrict "the circumstances in which an abortion may be performed in the third trimester or after viability."
From the Florida Senate website's summary of the bill:
Requiring a physician who offers to perform or who performs abortions to complete continuing education related to ethics; providing that an infant born alive subsequent to an attempted abortion is entitled to the same rights, powers, and privileges as are granted by the laws of this state; providing that it is a first-degree misdemeanor to unlawfully advertise how to obtain an abortion; prohibiting a person from establishing, conducting, managing, or operating a clinic in this state without a valid and current license issued by the Agency for Health Care Administration; revising the amount of the fine that the Agency for Health Care Administration may impose for a violation of ch. 390, F.S., relating to abortion, or part II of ch. 408, F.S., relating to licensure, etc.
According to a press release the Florida Alliance of Planned Parenthood Affiliates
SB 290 contains nearly a dozen unnecessary restrictions targeting doctors who provide abortion care in Florida. The bill is part of a highly coordinated attack on women's health care access across the country. Instead of creating more obstacles for women seeking reproductive health care, elected officials should make it easier to obtain affordable birth control and help parents and teachers provide comprehensive sex education. These are commonsense ways to prevent unintended pregnancies.
Emily Caponetti, the statewide legislative director for the Planned Parenthood organization, says in a statement today that "instead of focusing on creating jobs and fixing our economy last session, the Florida Legislature filed 18 bills that attacked women's health."
"By filing SB 290 during the first committee week, legislators are signaling their intention to play politics with women's lives once again in 2012," Caponetti says in today's statement.
73130c5d352f79530400d0b14e1421dc855a31a5629882bea5c01f5237caf62afe3c6cbab6bd30d0fe82cb81fdfc3e9f13693f6482d7ab6b824454fce46cc316


رفتار لیزر کنندگی محلول آبی دات های کوانتومی هسته – پوسته (CdSe) ZnS (QD) در یک حفره ریز قطره مایع کروی بررسی شده است. ما کسر حجمی کمینه QD لازم برای لیزری کردن را به مقدار 9.27x 10-6 ومقطع عرضی نشر QD ها به صورت 4.5x10-15 cm2 براورد کردیم. حفره مایع ریز قطره، با کمک رنگ ردامین Rh 6G) 6G) مشخص کردیم ودریافتیم که فاکتور Q حفره آن در رزونانس حالت گالری ویسپرینگ (WGM) باید 41.4x 10 باشد. Lasing behavior of water soluble (CdSe)ZnS core-shell quantum dots (QD) has been investigated in a spherical liquid microdrop cavity. We have estimated the minimum volume fraction of QD necessary for lasing as 9.27 × 10 −6 and emission cross section of the QDs as 4.5 × 10 −15 cm2. The microdrop liquid cavity has been characterized with the help of rhodamine 6G (Rh6G) dye and we found its cavity Q factor in whispering gallery mode (WGM) resonance to be 1.4 × 104.
پیشرفت های چشمگیر در فناوری رشد کریستال، به تازگی ساخت انواعی از نانوساختارهای نیمه رسانا مستقل و ساده همچون دات های کوانتومی نانوکریستالی صفر-بعدی (0D)، نانورشته های 1D و نانولوله ها و نانواعضای 2Dرا ممکن ساخته است. ویژگی های انتقال بار در چنین نانوساختارهایی، به طور گسترده و وسیعی مورد بررسی قرار گرفته است، با این امید که آنها بتوانند در دستگاه های الکتریکی و نوری در آینده به کار گرفته شوند. این نانوساختارهای "پایین-بالا " از نانوساختارهای همبافته که از مهندسی شکاف باند ساختار ناهمگن در یک جنبه مهم ساخته شده و به ططور بسیار وسیعی مورد مطالعه قرار گرفته است، متفاوت است. محیط دی الکتریک نانوساختارهای همبافته به طور اساسی با ناحیه نیمه رسانایی (ثابت دی الکتریک ) که در آن الکترون ها و حفرات قرار می گیرند، یکسان است. بهرحال، برای نانوساختارهای پایین-بالا، محیط دی الکتریک می تواند پس از رشد، اصلاح شود. این ویژگی، ابزار نوینی را برای مهندسی اندرکنش های بین حامل ها و/یا ناخالصی ها به واسطه محیط دی الکتریک میانجی گری کند. اثر محیط دی الکتریک بر روی ویژگی های انتقال بار نانوساختارهای پایین-بالا توجه زیادی را در مقایسه با اثر آن بر روی ویژگی های نوری، به خود جلب نکرده است. کار اخیر، نشان داده است که در نانواعضای 2D، تحریک الکترون می تواند یک تا دو مرتبه بزرگی، از طریق پوشش دادن آنها با ماده با دی الکتریک κ-بالا افزایش پیدا کند. هدف این کار، بررسی اثر محیط دی الکتریک بر روی انتقال الکترون در نانورشته های نیمه رسانا است. NW های نیمه رسانا، در حال حاضر می توانند تا قطر چندین نانومتر رشد کنند، که کوچکتر از طول موج گرمایی بروگلی مربوط به حامل ها است، در حالیکه طول موج آنها می تواند از چندین میکرومتر تجاوز کند. در این مقیاس های طولی، کاهش دانسیته حالت ها، با توجه به محدودیت کوانتومی، انتظار می رود که پراش را سرکوب کرده و منجر به تحرک پذیری های حامل شود. آزمایشات اخیر، بهبود حرکت های حامل در ترانزیستورهای اثر-میدانی نانورشته Ge/Si پوشیده با دی الکتریک های (HfO2) Ϗ-بالا را نشان داده است. Remarkable advances in crystal growth technology have recently enabled the fabrication of a variety of freestanding semiconductor nanostructures such as zero-dimensional 0D nanocrystal quantum dots, 1D nanowires NWs and nanotubes, and 2D nanomembranes. Charge transport properties in such nanostructures are being intensively investigated, in the hope that they might find usage in electronic and optical devices in the future. These "bottom-up" nanostructures differ from the more extensively studied epitaxial nanostructures created by heterostructure bandgap engineering in one crucial aspect. The dielectric environment of epitaxial nanostructures is essentially the same as the semiconducting region dielectric constant s where electrons and holes reside. However, for bottom-up nanostructures, the dielectric environment e can be modified after growth. This feature offers a novel tool to engineer interactions between carriers and/or impurities mediated by the dielectric surrounding. The effect of the dielectric environment on charge transport properties of bottom-up nanostructures has not received much attention as compared to its effect on optical properties.1 Recent work2 has shown that in 2D nanomembranes the electron mobility can be increased by one to two orders of magnitude by coating them with a high- dielectric material. The purpose of this work is to investigate the effect of the dielectric environment on electron transport in semiconductor nanowires. Semiconductor NWs can now be grown with diameters of a few nanometers, which is smaller than the thermal de Broglie wavelength of the carriers, while their lengths can exceed a few micrometers. At these length scales, the reduced density of states due to quantum confinement is expected to suppress scattering and lead to high carrier mobilities.3 Recent experiments4 have demonstrated improved carrier mobilities in Ge/Si nanowire field-effect transistors coated with high- HfO2 dielectrics.
غربالگری الکترونیک، یک پدیده چند جسمی است که به طور قوی به اندرکنش الکترون-الکترون در یک گاز الکترونی بستگی دارد. در اینجا، با نادیده گرفتن فرض "پس زمینه نامتناهی و همگن"، ما نشان می دهیم که محیط دی الکتریکی که گاز الکترونی را احاطه کرده است، اندرکنش الکترون-الکترون را تغییر داده، منجر به نرمالیزاسیون مجدد اساسی پاسخ ایستا و دینامیک گاز الکترونی می شود. نرمالیزاسیون مجدد تابع غربالگری ایستا بر مبنای محیط دی الکتریک بر حرکت قابل اندازه گیری تجربی اثر می گذارد، همانطور که برای لایه وارونگی-Si جهت نمایش موضوع، نشان داده شده است. نتایج تحلیلی هستند و می توانند برای پیش بینی دقیق مقدار انتقال هر سیستم گاز دو بعدی با محیط دی الکتریک ناهمگن استفاده شوند. Electronic screening is a many-body phenomenon that strongly depends on the electron-electron interaction in an electron gas. Here, relaxing the assumption of "infinite and homogeneous background," we show that the dielectric environment surrounding the electron gas alters the electron-electron interaction leading to substantial re-normalization of static and dynamic response of the electron gas. The re-normalization of static screening function by dielectric environment impacts experimentally measurable mobility as shown for Si-inversion layer for illustration. Results are analytical and can be used for accurate prediction of transport quantity for any two dimensional gas system with inhomogeneous dielectric environment.


Returning to the atmospheric and mysterious Jazz Age world of Born of Illusion, Teri Brown's Born of Corruption is a 64-page companion digital novella about what happens when New York City's most notorious socialites, mobsters, and bootleggers get together for a larger-than-life scavenger hunt . . . and someone gets killed.
Cynthia Gaylord, a vivacious blonde flapper and the niece of one of the most infamous mob bosses in New York City, loves scavenger hunts, and the one she's putting together for her best friend Anna's going-away party is going to be the swankiest one ever. But then, Anna Van Housen is no ordinary friend. She is reputed to be Harry Houdini's illegitimate daughter and a magician of the first order—and she possesses psychic powers.
Turns out, Anna's life isn't the only one filled with danger, suspicion, and intrigue. Cynthia Gaylord, Anna's best friend, wealthy socialite, wife of a New York aristocrat, and niece to the head of the Rothstein family (Family with the big "F"), is not a complete stranger to the dark, seedy, and illegal… though she prefers to (mostly) stay out of it. But when someone crashes her glitzy going-away party for Anna with a murder and blame is cast on someone she cares for, Cynthia is determined to find out what really happened before it's too late.
And she does… kinda. In terms of being a good mystery, this one is interesting but plays out rather quickly. And more than that it does just that… plays out. Oh, Cynthia's determined to find out what's happened, but she never gets much of a chance to investigate. Events just keep unfolding and she just tumbles right along with them as they happen. It's interesting, just not very complex.
So, it was a so-so mystery. What I really enjoyed about this novel was getting Cynthia's perspective. She's just a trip. She's a bit pampered, rich, comes across as a little shallow, a little immature, and a little catty — all things that could make her so instantly annoying or unlikable, and yet she doesn't seem to take herself too seriously and she's extremely loyal to the people she loves. Although, when it comes to Anna, I will say that I think she's more than a little in love with Anna's status as an illusionsist/psychic, and the status this in turn gives her. But even so, it's obvious, she also genuinely cares for Anna. It's also interesting to get her perception of Anna, since the two friends could not be more opposite.
I also love the setting and time of these books, and I think that Brown does a fantastic job portraying this time period through her writing. The glitz, the glamour, the seediness, the thriving criminal underworld, the danger, the extreme extravagance and desperate frenzied energy of the Roaring Twenties. It's just such a fascinating time period as the world is exponentially modernizing and changing while steadily moving toward the brink of economic collapse, and Brown captures the tone and the time well.
Overall, I love when novellas take on a different POV from the novellas, allowing me to see everything in a brand new way, and Born of Corruption does just that. It's not a necessary addition to this series, but it's great character building, reinforces the world Brown has built, and provides a great little segue into Born of Deception.
– Necessary? No, but recommended nonetheless.
– Prior Knowledge needed? Yes.


text:
Sony SupportDSC-W610
3D content from a USB device or home network will not playback in the Android TV.
The TV does not support 3D photo content from the Home network or a USB memory stick.
Content that supports 3D auto-play will be played automatically in 3D. If it does not play in 3D, choose 3D(Side-by-Side) or 3D(Over-Under) from 3D settings as follows.
Press the Action Menu button on the remote.
Select 3D in the Display & Sound category.
Select 3D display.
Choose 3D(side-by-Side) or 3D(Over-Under).
NOTE: If the content is not played in 3D by the steps above, please update the TV software to the latest version, and try again. For how to update, refer to: How to perform a software update .
The TV does not playback videos from a camera or camcorder connected using a USB connection.
What are the differences in DLNA device classes?
How do I register a Sony product for the standard manufacturer's warranty?
Frequently Asked Questions about connecting a camera via USB
Windows 10 Compatibility Information


text:
Q: TYPO3: How to configure $GLOBALS['TYPO3_CONF_VARS']['LOG'] correclty I'm trying to congiure logging for one custom class in TYPO3 using the configuration of the logging framework as explained here:
https://docs.typo3.org/m/typo3/reference-coreapi/8.7/en-us/ApiOverview/Logging/Configuration/Index.html
I want to configure logging for every class in
\Aip\Taglialacoda\Task\
With no configuration log messages are written in the log file under typo3temp\var\log
I have made several tries like this one:
$GLOBALS['TYPO3_CONF_VARS']['LOG']['Aip']['Taglialacoda']['Task']['writerConfiguration'] = [
    TYPO3\CMS\Core\Log\LogLevel::INFO => [
        TYPO3\CMS\Core\Log\Writer\SyslogWriter::class => [],
    ]
];

The result is always the same: I cannot find messages logged anywhere.
The class I wrote is a task so it extends AbstractTask and has its own logger.
For this reason I have istantiated another logger (I don't want that every task write into SYS LOG)
As I said with no configuration the new logger writes into the log file.
Adding a mistyped configuration the class throws an exception (so the configuration is taken into account).
Using the configuration above the log message seems to disappear.

A: Summary:
As far as I know, you are out of luck if you want to log with the logging framework to the sys_log DB table and read this in the "Log" BE module with only core functionality.
Either:

*

*Use extension "logs" (source on GitHub) (disclaimer: this is a third party extension which has been "archived" on GitHub, I do not know if or how long it will be supported). It creates its own backend module "Log" in "Admin Tools".

*Use file logging or sentry logging

*Write your own LogWriter which will write to the sys_log table in the correct format which is readable by the "Log" BE module.

Your configuration looks good (in general), but will not work as expected.
You may want to make sure first, you know where SyslogWriter will write to. This is explained in the documentation. SyslogWriter will not write to the "sys_log" database table as one might expect but via syslog to the system log. Where this ends up, depends on your configuration. You might want to check your /var/log/messages. This is probably not what you want. Use FileWriter or DatabaseWriter instead.
However, if you use DatabaseWriter, this will not be readable via the "Log" module in the backend, as mentioned in the documentation:

The Admin Tools > Log module is not adapted to the records written by the DatabaseWriter into the sys_log table. If you write such records there, you will not be able to see them using that module.
  Tip: There's a tool for viewing such records in the TYPO3 backend at https://github.com/vertexvaar/logs.

I think, it helps if you view the Logging in TYPO3 as 2 separate APIs:

*

*The "old" way of logging to the "sys_log" table with writelog() and viewing this with the "Log" module in the backend. This is no longer recommended in the documentation (though still used in the core).

*The newer way to log with the "Logging API" which can log to files, database tables etc. and is also extendable to log to other writers.

The method with 1 is configured by using $GLOBALS['TYPO3_CONF_VARS'][SYS][belogErrorReporting]
So, as already mentioned above, you are out of luck if you want to log with the logging framework (2.) to the sys_log and read this in the "Log" BE module with only core functionality. There is an extension listed https://github.com/vertexvaar/logs. Another possibility is to create your own LogWriter and then write to the sys_log with writelog() in that. This way you would be more flexible in the future.
What I personally also liked very much is the sentry method with sentry-typo3. You might want to have a look at it. But you do have to setup a sentry server. But this is very easily done (at least it worked out of the box for me), but of course that depends on where your site runs.

*

*look in the core typo3/sysext/core/Classes/Log/Writer/DatabaseWriter.php You will see that by default "sys_log" is used, but a different schema is required (as also mentioned in the documentation). In my opinion this makes no sense at all, but that is how it is.

*look in the core typo3/sysext/core/Classes/Log/Writer/SyslogWriter.php. You will see that the logging (in writeLog()) is done with the PHP function syslog. This is not aware of the TYPO3 logging in sys_log.

*look in the core error and exception handlers, e.g. typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php and you will see that logging is done via logging framework ($this->logger) and to sys_log.

A: this is for loggin your log messages in the log table (you can find the 'log' list in the backend)
if you want' to write to a file, use filewrite:
https://docs.typo3.org/m/typo3/reference-coreapi/8.7/en-us/ApiOverview/Logging/Writers/Index.html#filewriter

A: You may use the DatabaseWriter as described here.
You would have to adapt your code to this:
$GLOBALS['TYPO3_CONF_VARS']['LOG']['Aip']['Taglialacoda']['Task']['writerConfiguration'] = [
    TYPO3\CMS\Core\Log\LogLevel::INFO => [
        TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [],
    ]
];

This will add the logs to the sys_log table by default (You can also use a separate new table). As mentioned in the warning section, these records can't be read by the Admin tools -> Log module. You have to install typo3 logs module.

redpajama_set_name: RedPajamaStackExchange


text:
Their kitchens to your mouth: 10 restaurants that ship nationwide
In the mood for a decadent chocolate cake? ChocoBolo will ship their treats around the country.ChocoBolo / Today
Nov. 8, 2011, 2:35 PM UTC
By Linnea Covington
The food world erupted in glee when mouthwatering burgers from famous California fast food chain In-N-Out were recently made available for shipping, through the company Midtown Row, for a cool $56.
It got us thinking: With the holidays around the corner, who else is sending their scrumptious goods through the mail? We found 10 restaurants and bakeries that do just that, and some of the quality mail-order food might surprise you.
Ben's Original Chili: Made with a quarter pound of pork and beef smoked sausage, the quaint Washington D.C. chili house's classic dish has a fan club that includes President Barack Obama and Bill Cosby – in fact, their most classic version is named after Cosby. Ben's chili can be shipped to any of the 50 states via FedEx.
ChocoBolo: Formerly known as The Best Chocolate Cake in the World, this bakery café makes an amazing, possibly the best, chocolate cake in the country. And now, along with other Portuguese pastries and desserts, they are shipping their goods nationwide from New York. "We have a lot of demands from all over the country," said partner Adriano Calle Lucas. They have even sent their cakes to Hawaii.
Fiorella's Jack Stack Barbecue: For 50 years, this meat house has been smoking up some amazing barbecue in Kansas City. While they have four locations at which you can dine, you don't have to travel to Missouri to get some of their fine products — including slabs of pork ribs, beef tenderloin, burnt ends and even their celebrated sauces and rubs.
Charles Vergos Rendezvous: Also in the meat business, Charles Vergos's 60-year-plus restaurant might be one of the most famous barbecue places in the country. Imagine our surprise to find out they ship their Memphis-style ribs overnight, right after they spend a good deal of time in the smoker and get topped with their "World Famous" seasoning. They also offer their mustard slaw, baked beans and sauces for mail order.
Blackberry Farmstead will shop their selection of artisanal cheeses, pickles and meats.Blackberry Farmstead / Today
Blackberry Farm: Farm-to-table takes on a new meaning at this popular, luxury resort in Walland, Tenn. Instead of just making their selection of artisanal cheeses, preserves, pickles and charcuterie available at their beautiful, Great Smoky Mountains restaurant, The Barn, they now send off all these goods via FedEx—straight to your table.
Olive Grove: From the outside, this 17-year-old Maryland eatery doesn't look like much, but they have garnered a lot of favorable press for their crab cakes. By taking jumbo lump crabmeat and blending it with homemade breadcrumbs, eggs, mayonnaise and a super-secret seasoning, Olive Grove has hooked diners all across the nation — and now you can eat them anywhere in the nation.
Mary Mountain's Cookies: Most people don't realize how hard it is to bake at high altitudes, but at this darling cookie shop in Breckenridge, Colo., they have perfected it. If you stumbled on this tiny shop in the ski town, you might not realize how far their quarter-pound cookies go — literally. From chocolate caramel nut to snickerdoodles and oatmeal raisin, they are sent fresh from the mountains to you.
Portillo's: This Chicago restaurant chain started with a downtown hot dog stand called "The Dog House" in 1963 and has now expanded with numerous restaurants across the Midwest. But wait, there's more: They also ship Portillo's hot dogs, barbecue ribs and their popular Italian beef with gravy to your home, as long as it's in the United States.
Hubig's Pies: New Orleans transplants can now rest with ease knowing the uber-popular pie shop delivers those apple, lemon, sweet potato, cherry, peach, coconut and chocolate pies to your door, wherever you end up living. They ship the handmade pies by the case, and unless you specify what you want, they send an assortment.
Lou Malnati's Pizzaria: Lou Malnati's serves their classic Chicago-style deep dish pies not only to the happy folks lucky enough to live near them, but to anyone in the states who can place an order. Through cameos on shows "Pizza Wars" and "Throw Down with Bobby Flay," not only do you get a tasty pie to your door, but a little slice of fame.
Is there a restaurant you wish would ship their food to you?


There is an old adage, "leaders are made, not born and they are made by hard work". I happened to meet such a leader and some learning that I was able to list from my conversation are covered in this article.
There is an old adage, "leaders are made, not born and they are made by hard work". I happened to meet such a leader while my friend and I were paying visits to different Ganapathi Statues during Ganesh Chaturthi (an Indian festival). At one of the places, my friend introduced me to Mr. Gajanan Kale, MNS Navi Mumbai President. Looking past his political views and actions, Mr. Gajanan Kale is a humble and friendly human being. He also exudes great leadership qualities. We quickly got into a conversation where I happened to notice that he would use 'we' rather than 'I'. This is what got me interested in finding more about this leader.
Exhibiting a positive attitude and work towards creating a relaxed atmosphere in the workplace is important if you want to have a motivated team. "Even something as simple as organizing a volleyball or a cricket tournament every month can make an incredible difference.", says Mr. Kale. "People want to feel appreciated and valued. If you manage to give them the respect they want and deserve, they are likely to work harder when needed.", he continues.
Even when things go south, say, team members have made a big mistake that has, among others, led to low team morale, leaders should always stay positive, reflect on what has gone wrong, and find ways to tackle the challenges one by one. "Sometimes you win, sometimes you learn", he adds.
Exhibiting confidence and arrogance or self-satisfaction are two different things. A leader has to be a source of inspiration for his people; someone those working for him look up to, not a person they would happily punch in the face.
Remember that all eyes are on you when you have a leadership role. If you don't panic and remain poised and calm, especially when facing mishaps at work, chances are your team members will also adopt the same behavior. This will affect team morale and productivity in a very positive way. Moreover, you will notice that problems are solved more quickly too.
Failures will happen, no matter how hard you try to avoid it. That is okay. You just need to embrace failures, remain calm, and manage them efficiently. "Never show worry to your people, unless you want to have them binge-drinking, feeling down, and afraid", Mr. Kale points out. Instead, successful leaders logically think through the situation, dig out the root cause of the issue they are dealing with, utilize the resources they have in their hands, and continue to lead. Life goes on.
No great leader with poor communication skills has even existed. It is crucial to establish an open door policy and encourage communication. Listening to what people have to say and asking for their feedback when you introduce an idea are great ways to build rapport in the workplace. However, it is also crucial to provide feedback yourself when people face a challenge. This will encourage them to grow and do better.
Being a good leader means that you can communicate ideas clearly with those around you and, at the same time, are able to interpret your team members, stakeholders, and everybody else around you without taking what they say personally. "To be able to give good directions to people, you must get a good grasp of the situation. You can't do that without getting feedback from others", Mr. Kale emphasizes.
Wanting to do things by themselves is a common need among many seniors. A true leader, though, would know when to delegate and who to trust with what. It is impossible to promote a good team environment without showing confidence in team members' abilities anyway. Good leaders recognize that exhibiting trust in team member's skills can contribute to an increase in loyalty from their staff and higher workplace morale. Find, cultivate, and rely on those capable to make the company run smoothly even when you are not present. This is one of the greatest accomplishments of every leader.
Promoting an environment that encourages the development of the team's skills will make work easier. You can learn a whole lot from those working with you or for you if you leave them enough room to grow. More than often, we see team members develop skills we do not have as leaders. We definitely welcome this. Do not hold yourself back from sharing your knowledge with your team. Give them the chance to be achievers. This is how great leaders earn loyalty and respect from those around them.
"Having a sense of humour, taking personal responsibility for failure, making decisions based on lessons learnt from past failures, and sticking to their commitments, and, of course, leading by example are key traits that distinguish a person holding a senior position in an organization from a true leader.", Mr. Kale ends.
Ranjeet Sethi is an Entrepreneur, Contributor, Author, PR & Marketing Consultant for many Startups. He occasionally writes about Business, Startups, Relationship & Leadership at various Publications.