Displaying 20 results from an estimated 33 matches for "random32".
2018 Sep 21
1
Bias in R's random integers?
On 9/20/18 5:15 PM, Duncan Murdoch wrote:
> On 20/09/2018 6:59 AM, Ralf Stubner wrote:
>> It is difficult to do this in a package, since R does not provide access
>> to the random bits generated by the RNG. Only a float in (0,1) is
>> available via unif_rand().
>
> I believe it is safe to multiply the unif_rand() value by 2^32, and take
> the whole number part as an
2015 Feb 04
1
[PATCH v3 18/18] vhost: vhost_scsi_handle_vq() should just use copy_from_user()
...vecend(unsigned char *kdata, const struct iovec *iov,
- int offset, int len);
#endif
diff --git a/lib/Makefile b/lib/Makefile
index 3c3b30b..1071d06 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -24,7 +24,7 @@ obj-y += lockref.o
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
- gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \
+ gcd.o lcm.o list_sort.o uuid.o flex_array.o clz_ctz.o \
bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.o kfifo.o \
percpu-refcount.o percpu...
2015 Feb 04
1
[PATCH v3 18/18] vhost: vhost_scsi_handle_vq() should just use copy_from_user()
...vecend(unsigned char *kdata, const struct iovec *iov,
- int offset, int len);
#endif
diff --git a/lib/Makefile b/lib/Makefile
index 3c3b30b..1071d06 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -24,7 +24,7 @@ obj-y += lockref.o
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
- gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \
+ gcd.o lcm.o list_sort.o uuid.o flex_array.o clz_ctz.o \
bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.o kfifo.o \
percpu-refcount.o percpu...
2013 Oct 08
1
OT: errors compiling kernel module as a rpm package
...(param_set_int) = 0xff964b25
kernel(per_cpu__current_task) = 0x4f1939c7
kernel(per_cpu__kernel_stack) = 0x6dcaeb88
kernel(per_cpu__this_cpu_off) = 0x57adf756 kernel(prepare_to_wait) =
0x33d92f9a kernel(printk) = 0xea147363 kernel(pskb_expand_head) =
0xf5f5d2d9 kernel(pv_irq_ops) = 0x78764f4e kernel(random32) =
0xb86e4ab9 kernel(rcu_barrier) = 0x60a13e90 kernel(register_netdevice)
= 0xe85f2610 kernel(register_netdevice_notifier) = 0x63ecad53
kernel(register_pernet_gen_device) = 0x72428be7 kernel(rtnl_lock) =
0xc7a4fbed kernel(rtnl_unlock) = 0x6e720ff2 kernel(schedule) =
0x01000e51 kernel(sk_release_ker...
2018 Jun 12
8
[PATCH 0/3] Use sbitmap instead of percpu_ida
Removing the percpu_ida code nets over 400 lines of removal. It's not
as spectacular as deleting an entire architecture, but it's still a
worthy reduction in lines of code.
Untested due to lack of hardware and not understanding how to set up a
target platform.
Changes from v1:
- Fixed bugs pointed out by Jens in iscsit_wait_for_tag()
- Abstracted out tag freeing as requested by Bart
2018 Jun 12
8
[PATCH 0/3] Use sbitmap instead of percpu_ida
Removing the percpu_ida code nets over 400 lines of removal. It's not
as spectacular as deleting an entire architecture, but it's still a
worthy reduction in lines of code.
Untested due to lack of hardware and not understanding how to set up a
target platform.
Changes from v1:
- Fixed bugs pointed out by Jens in iscsit_wait_for_tag()
- Abstracted out tag freeing as requested by Bart
2018 May 15
6
[PATCH 0/2] Use sbitmap instead of percpu_ida
From: Matthew Wilcox <mawilcox at microsoft.com>
This is a pretty rough-and-ready conversion of the target drivers
from using percpu_ida to sbitmap. It compiles; I don't have a target
setup, so it's completely untested. I haven't tried to do anything
particularly clever here, so it's possible that, for example, the wait
queue in iscsi_target_util could be more clever, like
2007 May 09
1
[patch 3/9] lguest: the host code
...d long pgtable)
+{
+ unsigned int i;
+ for (i = 0; i < ARRAY_SIZE(lg->pgdirs); i++)
+ if (lg->pgdirs[i].cr3 == pgtable)
+ break;
+ return i;
+}
+
+static unsigned int new_pgdir(struct lguest *lg,
+ unsigned long cr3,
+ int *blank_pgdir)
+{
+ unsigned int next;
+
+ next = random32() % ARRAY_SIZE(lg->pgdirs);
+ if (!lg->pgdirs[next].pgdir) {
+ lg->pgdirs[next].pgdir = (spgd_t *)get_zeroed_page(GFP_KERNEL);
+ if (!lg->pgdirs[next].pgdir)
+ next = lg->pgdidx;
+ else
+ /* There are no mappings: you'll need to re-pin */
+ *blank_pgdir = 1;
+ }
+ lg->...
2007 May 09
1
[patch 3/9] lguest: the host code
...d long pgtable)
+{
+ unsigned int i;
+ for (i = 0; i < ARRAY_SIZE(lg->pgdirs); i++)
+ if (lg->pgdirs[i].cr3 == pgtable)
+ break;
+ return i;
+}
+
+static unsigned int new_pgdir(struct lguest *lg,
+ unsigned long cr3,
+ int *blank_pgdir)
+{
+ unsigned int next;
+
+ next = random32() % ARRAY_SIZE(lg->pgdirs);
+ if (!lg->pgdirs[next].pgdir) {
+ lg->pgdirs[next].pgdir = (spgd_t *)get_zeroed_page(GFP_KERNEL);
+ if (!lg->pgdirs[next].pgdir)
+ next = lg->pgdidx;
+ else
+ /* There are no mappings: you'll need to re-pin */
+ *blank_pgdir = 1;
+ }
+ lg->...
2009 Jun 16
1
[PATCH 1/2] dm-ioband: I/O bandwidth controller v1.12.0: main part
Hi All,
This is the dm-ioband version 1.12.0 release. dm-ioband is an I/O
bandwidth controller implemented as a device-mapper driver and can
control bandwidth on per partition, per user, per process , per
virtual machine (such as KVM or Xen) basis.
The major change of this release is that a new bandwidth control
policy "range-bw" is supported. This policy is developed by Dong-Jae
Kang,
2009 Jun 16
1
[PATCH 1/2] dm-ioband: I/O bandwidth controller v1.12.0: main part
Hi All,
This is the dm-ioband version 1.12.0 release. dm-ioband is an I/O
bandwidth controller implemented as a device-mapper driver and can
control bandwidth on per partition, per user, per process , per
virtual machine (such as KVM or Xen) basis.
The major change of this release is that a new bandwidth control
policy "range-bw" is supported. This policy is developed by Dong-Jae
Kang,
2009 Jun 16
1
[PATCH 1/2] dm-ioband: I/O bandwidth controller v1.12.0: main part
Hi All,
This is the dm-ioband version 1.12.0 release. dm-ioband is an I/O
bandwidth controller implemented as a device-mapper driver and can
control bandwidth on per partition, per user, per process , per
virtual machine (such as KVM or Xen) basis.
The major change of this release is that a new bandwidth control
policy "range-bw" is supported. This policy is developed by Dong-Jae
Kang,
2009 Jul 31
1
[PATCH] dm-ioband-v1.12.3: I/O bandwidth controller
...ime_slice_expired = TIME_SLICE_NOT_EXPIRED;
+
+ return 0;
+}
+
+/*
+ * Calculate the priority of given ioband_group
+ */
+static int range_bw_priority(struct ioband_group *gp)
+{
+ struct ioband_device *dp = gp->c_banddev;
+ int prio = 0;
+
+ if (dp->g_io_mode == LEFTOVER_IO_MODE) {
+ prio = random32() % MINBW_PRIO_BASE;
+ if (prio == 0)
+ prio = 1;
+ } else if (gp->c_io_mode == MINBW_IO_MODE) {
+ prio = (gp->c_min_bw_token - gp->c_consumed_min_bw_token) *
+ MINBW_PRIO_BASE;
+ } else if (gp->c_io_mode == DEFAULT_IO_MODE) {
+ prio = MINBW_PRIO_BASE;
+ } else if (gp->c_...
2009 Jul 31
1
[PATCH] dm-ioband-v1.12.3: I/O bandwidth controller
...ime_slice_expired = TIME_SLICE_NOT_EXPIRED;
+
+ return 0;
+}
+
+/*
+ * Calculate the priority of given ioband_group
+ */
+static int range_bw_priority(struct ioband_group *gp)
+{
+ struct ioband_device *dp = gp->c_banddev;
+ int prio = 0;
+
+ if (dp->g_io_mode == LEFTOVER_IO_MODE) {
+ prio = random32() % MINBW_PRIO_BASE;
+ if (prio == 0)
+ prio = 1;
+ } else if (gp->c_io_mode == MINBW_IO_MODE) {
+ prio = (gp->c_min_bw_token - gp->c_consumed_min_bw_token) *
+ MINBW_PRIO_BASE;
+ } else if (gp->c_io_mode == DEFAULT_IO_MODE) {
+ prio = MINBW_PRIO_BASE;
+ } else if (gp->c_...
2009 Jul 31
1
[PATCH] dm-ioband-v1.12.3: I/O bandwidth controller
...ime_slice_expired = TIME_SLICE_NOT_EXPIRED;
+
+ return 0;
+}
+
+/*
+ * Calculate the priority of given ioband_group
+ */
+static int range_bw_priority(struct ioband_group *gp)
+{
+ struct ioband_device *dp = gp->c_banddev;
+ int prio = 0;
+
+ if (dp->g_io_mode == LEFTOVER_IO_MODE) {
+ prio = random32() % MINBW_PRIO_BASE;
+ if (prio == 0)
+ prio = 1;
+ } else if (gp->c_io_mode == MINBW_IO_MODE) {
+ prio = (gp->c_min_bw_token - gp->c_consumed_min_bw_token) *
+ MINBW_PRIO_BASE;
+ } else if (gp->c_io_mode == DEFAULT_IO_MODE) {
+ prio = MINBW_PRIO_BASE;
+ } else if (gp->c_...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
..._guest_info *linfo, struct lguest_pgd *pgdir)
+{
+ unsigned int i;
+ for (i = 0; i < pgd_index(linfo->page_offset); i++)
+ release_pgd(pgdir->pgdir, i);
+}
+
+static struct lguest_pgd *new_pgdir(struct lguest_guest_info *linfo, u64 cr3)
+{
+ unsigned int next;
+ unsigned int i;
+
+ next = random32() % LGUEST_PGDIRS;
+ for (i=(next+1) % LGUEST_PGDIRS; i != next; i = (i+1) % LGUEST_PGDIRS) {
+ if (linfo->pgdirs[i].flags & LGUEST_PGD_BUSY_FL)
+ continue;
+ break;
+ }
+ BUG_ON(linfo->pgdirs[i].flags & LGUEST_PGD_BUSY_FL);
+
+ next = i;
+
+ linfo->pgdirs[next].cr3 = cr3;
+ if...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
..._guest_info *linfo, struct lguest_pgd *pgdir)
+{
+ unsigned int i;
+ for (i = 0; i < pgd_index(linfo->page_offset); i++)
+ release_pgd(pgdir->pgdir, i);
+}
+
+static struct lguest_pgd *new_pgdir(struct lguest_guest_info *linfo, u64 cr3)
+{
+ unsigned int next;
+ unsigned int i;
+
+ next = random32() % LGUEST_PGDIRS;
+ for (i=(next+1) % LGUEST_PGDIRS; i != next; i = (i+1) % LGUEST_PGDIRS) {
+ if (linfo->pgdirs[i].flags & LGUEST_PGD_BUSY_FL)
+ continue;
+ break;
+ }
+ BUG_ON(linfo->pgdirs[i].flags & LGUEST_PGD_BUSY_FL);
+
+ next = i;
+
+ linfo->pgdirs[next].cr3 = cr3;
+ if...
2009 Jul 21
1
[PATCH 1/9] I/O bandwidth controller and BIO tracking
Hi all,
These are new releases of dm-ioband and blkio-cgroup. The major
changes of these releases are:
- dm-ioband can be configured through the cgroup interface. The
bandwidth can be assigned on a per cgroup per block device basis.
- The event tracing is supported that helps in debugging and
monitoring dm-ioband.
- A document for blkio-cgroup is available at
2009 Jul 21
1
[PATCH 1/9] I/O bandwidth controller and BIO tracking
Hi all,
These are new releases of dm-ioband and blkio-cgroup. The major
changes of these releases are:
- dm-ioband can be configured through the cgroup interface. The
bandwidth can be assigned on a per cgroup per block device basis.
- The event tracing is supported that helps in debugging and
monitoring dm-ioband.
- A document for blkio-cgroup is available at
2009 Jul 21
1
[PATCH 1/9] I/O bandwidth controller and BIO tracking
Hi all,
These are new releases of dm-ioband and blkio-cgroup. The major
changes of these releases are:
- dm-ioband can be configured through the cgroup interface. The
bandwidth can be assigned on a per cgroup per block device basis.
- The event tracing is supported that helps in debugging and
monitoring dm-ioband.
- A document for blkio-cgroup is available at