/* * altera.h * * altera FPGA driver * * Copyright (C) Altera Corporation 1998-2001 * Copyright (C) 2010 NetUP Inc. * Copyright (C) 2010 Igor M. Liplianin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _ALTERA_H_ #define _ALTERA_H_ struct altera_config { void *dev; u8 *action; int (*jtag_io) (void *dev, int tms, int tdi, int tdo); }; #if defined(CONFIG_ALTERA_STAPL) || \ (defined(CONFIG_ALTERA_STAPL_MODULE) && defined(MODULE)) extern int altera_init(struct altera_config *config, const struct firmware *fw); #else static inline int altera_init(struct altera_config *config, const struct firmware *fw) { printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); return 0; } #endif /* CONFIG_ALTERA_STAPL */ #endif /* _ALTERA_H_ */
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2016-05-13 12:16:35 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-05-13 17:29:23 +0200
commit3491caf2755e9f312666712510d80b00c81ff247 (patch)
tree2c26cb94956a74db734e110c51f600d28aedd5db
parentd7e1633abf9b1cc198bb673a59a01a3767f16b94 (diff)
KVM: halt_polling: provide a way to qualify wakeups during poll
Some wakeups should not be considered a sucessful poll. For example on s390 I/O interrupts are usually floating, which means that _ALL_ CPUs would be considered runnable - letting all vCPUs poll all the time for transactional like workload, even if one vCPU would be enough. This can result in huge CPU usage for large guests. This patch lets architectures provide a way to qualify wakeups if they should be considered a good/bad wakeups in regard to polls. For s390 the implementation will fence of halt polling for anything but known good, single vCPU events. The s390 implementation for floating interrupts does a wakeup for one vCPU, but the interrupt will be delivered by whatever CPU checks first for a pending interrupt. We prefer the woken up CPU by marking the poll of this CPU as "good" poll. This code will also mark several other wakeup reasons like IPI or expired timers as "good". This will of course also mark some events as not sucessful. As KVM on z runs always as a 2nd level hypervisor, we prefer to not poll, unless we are really sure, though. This patch successfully limits the CPU usage for cases like uperf 1byte transactional ping pong workload or wakeup heavy workload like OLTP while still providing a proper speedup. This also introduced a new vcpu stat "halt_poll_no_tuning" that marks wakeups that are considered not good for polling. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Radim Krčmář <rkrcmar@redhat.com> (for an earlier version) Cc: David Matlack <dmatlack@google.com> Cc: Wanpeng Li <kernellwp@gmail.com> [Rename config symbol. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>