Displaying 20 results from an estimated 52 matches for "nvec".
Did you mean:
nsec
2010 Apr 07
0
[RFC] vhost-blk implementation (v2)
...ruct vhost_blk {
+ struct vhost_dev dev;
+ struct vhost_virtqueue vqs[VHOST_BLK_VQ_MAX];
+ struct vhost_poll poll[VHOST_BLK_VQ_MAX];
+};
+
+struct vhost_blk_io {
+ struct list_head list;
+ struct work_struct work;
+ struct vhost_blk *blk;
+ struct file *file;
+ int head;
+ uint32_t type;
+ uint32_t nvecs;
+ uint64_t sector;
+ uint64_t len;
+ struct iovec iov[0];
+};
+
+static struct workqueue_struct *vblk_workqueue;
+static LIST_HEAD(write_queue);
+static LIST_HEAD(read_queue);
+
+static void handle_io_work(struct work_struct *work)
+{
+ struct vhost_blk_io *vbio, *entry;
+ struct vhost_virtqueue...
2010 Apr 07
0
[RFC] vhost-blk implementation (v2)
...ruct vhost_blk {
+ struct vhost_dev dev;
+ struct vhost_virtqueue vqs[VHOST_BLK_VQ_MAX];
+ struct vhost_poll poll[VHOST_BLK_VQ_MAX];
+};
+
+struct vhost_blk_io {
+ struct list_head list;
+ struct work_struct work;
+ struct vhost_blk *blk;
+ struct file *file;
+ int head;
+ uint32_t type;
+ uint32_t nvecs;
+ uint64_t sector;
+ uint64_t len;
+ struct iovec iov[0];
+};
+
+static struct workqueue_struct *vblk_workqueue;
+static LIST_HEAD(write_queue);
+static LIST_HEAD(read_queue);
+
+static void handle_io_work(struct work_struct *work)
+{
+ struct vhost_blk_io *vbio, *entry;
+ struct vhost_virtqueue...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...gt; --- a/arch/x86/include/asm/pci.h
> +++ b/arch/x86/include/asm/pci.h
> @@ -96,10 +96,10 @@ extern void pci_iommu_alloc(void);
> #ifdef CONFIG_PCI_MSI
> /* implemented in arch/x86/kernel/apic/io_apic. */
> struct msi_desc;
> -int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
> +int native_setup_msi_irqs(struct msi_irqs *msi, int nvec, int type);
> void native_teardown_msi_irq(unsigned int irq);
> -void native_restore_msi_irqs(struct pci_dev *dev);
> -int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc,
> +void native_restore_msi_...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...gt; --- a/arch/x86/include/asm/pci.h
> +++ b/arch/x86/include/asm/pci.h
> @@ -96,10 +96,10 @@ extern void pci_iommu_alloc(void);
> #ifdef CONFIG_PCI_MSI
> /* implemented in arch/x86/kernel/apic/io_apic. */
> struct msi_desc;
> -int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
> +int native_setup_msi_irqs(struct msi_irqs *msi, int nvec, int type);
> void native_teardown_msi_irq(unsigned int irq);
> -void native_restore_msi_irqs(struct pci_dev *dev);
> -int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc,
> +void native_restore_msi_...
2014 Jul 26
0
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...i.h
index 0892ea0..04c9ef6 100644
--- a/arch/x86/include/asm/pci.h
+++ b/arch/x86/include/asm/pci.h
@@ -96,10 +96,10 @@ extern void pci_iommu_alloc(void);
#ifdef CONFIG_PCI_MSI
/* implemented in arch/x86/kernel/apic/io_apic. */
struct msi_desc;
-int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
+int native_setup_msi_irqs(struct msi_irqs *msi, int nvec, int type);
void native_teardown_msi_irq(unsigned int irq);
-void native_restore_msi_irqs(struct pci_dev *dev);
-int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc,
+void native_restore_msi_irqs(struct msi_irqs *msi...
2007 Sep 25
2
Need help with function writing
...#39; data is constructed. Output is a one-row
# data frame reporting the results of the test and
# confidence interval
##################################################
trtvec=as.factor(trtvec)
boxplot(split(yvec,trtvec))
title(header)
ybar=tapply(yvec,trtvec,mean)
varvec=tapply(yvec,trtvec,var)
nvec=table(trtvec)
error.df=nvec[1]+nvec[2]-2
pooled.var=((nvec[1]-1)*varvec[1]+(nvec[2]-1)*varvec[2])/error.df
diff12estimate=ybar[1]-ybar[2]
stderr=sqrt(pooled.var*((1/nvec[1])+(1/nvec[2])))
tratio=diff12estimate/stderr
twosidedP=2*(1-pt(abs(tratio),error.df))
tcrit=qt(1-alpha/2,error.df)
lower=diff12...
2007 Jul 27
3
(PR#9811) sequence(c(2, 0, 3)) produces surprising results,
...write (see below).
We could make seq_len take a vector argument, but as you point out in a
followup that makes it slower in the common case. It also changes its
meaning if a length > 1 vector is supplied, and would speed matter in the
long-vector case? What does
sequence0 <- function (nvec)
{
s <- integer(0)
for (i in nvec) s <- c(s, seq_len(i))
s
}
not do that is more than a very rare need?
On Thu, 26 Jul 2007, bill at insightful.com wrote:
> Full_Name: Bill Dunlap
> Version: 2.5.0
> OS: Linux
> Submission from: (NULL) (70.98.76.47)
>
>
>...
2011 Oct 08
1
HWEBayes, swapping the homozygotes genotype frequencies
I evaluated the Bayes factor in the k=2 allele case with a "triangular"
prior under the null as in the example in the help file:
HWETriangBF2(nvec=c(88,10,2))
[1] 0.4580336
When I swap the n11 entry and n22 entry of nvec, I received totally
different Bayes factor:
>
> HWETriangBF2(nvec=c(2,10,88))
[1] 5.710153
>
In my understanding, defining the genotype frequency as n11 or n22 are
arbitrary.
So I was expecting the same value...
2014 Jul 26
0
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...*dev = msi->data; //TO BE DONE: rework msi_chip to support Non-PCI
struct msi_chip *chip = dev->bus->msi;
int err;
@@ -56,8 +57,9 @@ void __weak arch_teardown_msi_irq(unsigned int irq)
chip->teardown_irq(chip, irq);
}
-int __weak arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
+int __weak arch_msi_check_device(struct msi_irqs *msi, int nvec, int type)
{
+ struct pci_dev *dev = msi->data; //TO BE DONE: rework msi_chip to support Non-PCI
struct msi_chip *chip = dev->bus->msi;
if (!chip || !chip->check_device)
@@ -66,7 +68,7 @@ int __weak arch_...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all,
The series is a draft of generic MSI driver that supports PCI
and Non-PCI device which have MSI capability. If you're not interested
it, sorry for the noise.
The series is based on Linux-3.16-rc1.
MSI was introduced in PCI Spec 2.2. Currently, kernel MSI
driver codes are bonding with PCI device. Because MSI has a lot
advantages in design. More and more non-PCI devices want to
use
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all,
The series is a draft of generic MSI driver that supports PCI
and Non-PCI device which have MSI capability. If you're not interested
it, sorry for the noise.
The series is based on Linux-3.16-rc1.
MSI was introduced in PCI Spec 2.2. Currently, kernel MSI
driver codes are bonding with PCI device. Because MSI has a lot
advantages in design. More and more non-PCI devices want to
use
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...si_chip to support
> Non-PCI
> struct msi_chip *chip = dev->bus->msi;
> int err;
>
> @@ -56,8 +57,9 @@ void __weak arch_teardown_msi_irq(unsigned int irq)
> chip->teardown_irq(chip, irq);
> }
>
> -int __weak arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
> +int __weak arch_msi_check_device(struct msi_irqs *msi, int nvec, int type)
> {
> + struct pci_dev *dev = msi->data; //TO BE DONE: rework msi_chip to support
> Non-PCI
> struct msi_chip *chip = dev->bus->msi;
>
> if (!chip || !chip->check_device)...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...si_chip to support
> Non-PCI
> struct msi_chip *chip = dev->bus->msi;
> int err;
>
> @@ -56,8 +57,9 @@ void __weak arch_teardown_msi_irq(unsigned int irq)
> chip->teardown_irq(chip, irq);
> }
>
> -int __weak arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
> +int __weak arch_msi_check_device(struct msi_irqs *msi, int nvec, int type)
> {
> + struct pci_dev *dev = msi->data; //TO BE DONE: rework msi_chip to support
> Non-PCI
> struct msi_chip *chip = dev->bus->msi;
>
> if (!chip || !chip->check_device)...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...k arch_teardown_msi_irq(unsigned int irq)
> +{
> + struct msi_chip *chip = irq_get_chip_data(irq);
> +
> + if (!chip || !chip->teardown_irq)
> + return;
> +
> + chip->teardown_irq(chip, irq);
> +}
> +
> +int __weak arch_msi_check_device(struct msi_irqs *msi, int nvec, int type)
> +{
> + struct pci_dev *dev = msi->data;
> + struct msi_chip *chip = dev->bus->msi; //TO BE DONE: rework msi_chip to
> support Non-PCI MSI
> +
> + if (!chip || !chip->check_device)
> + return 0;
> +
> + return chip->check_device(chip, dev, nvec...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...k arch_teardown_msi_irq(unsigned int irq)
> +{
> + struct msi_chip *chip = irq_get_chip_data(irq);
> +
> + if (!chip || !chip->teardown_irq)
> + return;
> +
> + chip->teardown_irq(chip, irq);
> +}
> +
> +int __weak arch_msi_check_device(struct msi_irqs *msi, int nvec, int type)
> +{
> + struct pci_dev *dev = msi->data;
> + struct msi_chip *chip = dev->bus->msi; //TO BE DONE: rework msi_chip to
> support Non-PCI MSI
> +
> + if (!chip || !chip->check_device)
> + return 0;
> +
> + return chip->check_device(chip, dev, nvec...
2014 Jul 26
0
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...(desc->irq, chip);
+ return 0;
+}
+
+void __weak arch_teardown_msi_irq(unsigned int irq)
+{
+ struct msi_chip *chip = irq_get_chip_data(irq);
+
+ if (!chip || !chip->teardown_irq)
+ return;
+
+ chip->teardown_irq(chip, irq);
+}
+
+int __weak arch_msi_check_device(struct msi_irqs *msi, int nvec, int type)
+{
+ struct pci_dev *dev = msi->data;
+ struct msi_chip *chip = dev->bus->msi; //TO BE DONE: rework msi_chip to support Non-PCI MSI
+
+ if (!chip || !chip->check_device)
+ return 0;
+
+ return chip->check_device(chip, dev, nvec, type);
+}
+
+int __weak arch_setup_msi_irqs...
2007 Sep 24
1
hypothesis testing
...' data is constructed. Output is a one-row #
data frame reporting the results of the test and # confidence interval
##################################################
trtvec=as.factor(trtvec)
boxplot(split(yvec,trtvec))
title(header)
ybar=tapply(yvec,trtvec,mean)
varvec=tapply(yvec,trtvec,var)
nvec=table(trtvec)
error.df=nvec[1]+nvec[2]-2
pooled.var=((nvec[1]-1)*varvec[1]+(nvec[2]-1)*varvec[2])/error.df
diff12estimate=ybar[1]-ybar[2]
stderr=sqrt(pooled.var*((1/nvec[1])+(1/nvec[2])))
tratio=diff12estimate/stderr
twosidedP=2*(1-pt(abs(tratio),error.df))
tcrit=qt(1-alpha/2,error.df)
lower=diff12...
2010 Nov 28
1
faster base::sequence
Hello,
Based on yesterday's R-help thread (help: program efficiency), and
following Bill's suggestions, it appeared that sequence:
> sequence
function (nvec)
unlist(lapply(nvec, seq_len))
<environment: namespace:base>
could benefit from being written in C to avoid unnecessary memory
allocations.
I made this version using inline:
require( inline )
sequence_c <- local( {
fx <- cfunction( signature( x = "integer"), '...
2009 May 07
2
[PATCH] msi-x: let drivers retry when not enough vectors
...st is exceeding the number
- * of irqs available. Driver should use the returned value to re-send
- * its request.
+ * of irqs or MSI-X vectors available. Driver should use the returned value to
+ * re-send its request.
**/
int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec)
{
@@ -704,7 +704,7 @@ int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec)
nr_entries = pci_msix_table_size(dev);
if (nvec > nr_entries)
- return -EINVAL;
+ return nr_entries;
/* Check for any invalid entries */
for (i = 0; i < nvec; i++) {
--
1.6.3....
2009 May 07
2
[PATCH] msi-x: let drivers retry when not enough vectors
...st is exceeding the number
- * of irqs available. Driver should use the returned value to re-send
- * its request.
+ * of irqs or MSI-X vectors available. Driver should use the returned value to
+ * re-send its request.
**/
int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec)
{
@@ -704,7 +704,7 @@ int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec)
nr_entries = pci_msix_table_size(dev);
if (nvec > nr_entries)
- return -EINVAL;
+ return nr_entries;
/* Check for any invalid entries */
for (i = 0; i < nvec; i++) {
--
1.6.3....