search for: cur_tim

Displaying 13 results from an estimated 13 matches for "cur_tim".

Did you mean: cur_time
2000 Aug 01
2
ogg123 timekeeping
...rate: 133.3 How about? : <snip from=ogg123.c> info.u_time = ov_time_total (&vf, -1); /* Seconds with double precision */ gettimeofday (&start_time, NULL); t_min = (long) info.u_time / (long) 60; t_sec = info.u_time - 60 * t_min; while (! eos) { gettimeofday (&cur_time, NULL); c_min = (long) (cur_time.tv_sec - start_time.tv_sec) / (long) 60; c_sec = (cur_time.tv_sec - start_time.tv_sec) - 60 * c_min + ((cur_time.tv_usec - start_time.tv_usec) / 1000000.0); </snip> Scream now! I'm committing... I know time functions like this have e...
2011 Jun 21
13
VM disk I/O limit patch
...ies + msecs_to_jiffies(1000); + blkif->reqcount = blkif->reqrate; + if (blkif->reqcount < blkif->reqmin) + blkif->reqcount = blkif->reqmin; +} + int blkif_schedule(void *arg) { blkif_t *blkif = arg; struct vbd *vbd = &blkif->vbd; + int ret = 0; + struct timeval cur_time; blkif_get(blkif); @@ -232,12 +248,34 @@ int blkif_schedule(void *arg) blkif->waiting_reqs = 0; smp_mb(); /* clear flag *before* checking for work */ - if (do_block_io_op(blkif)) + ret = do_block_io_op(blkif); + if (ret) blkif->waiting_reqs = 1; unplug_queue(blkif);...
2011 Jun 21
13
VM disk I/O limit patch
...ies + msecs_to_jiffies(1000); + blkif->reqcount = blkif->reqrate; + if (blkif->reqcount < blkif->reqmin) + blkif->reqcount = blkif->reqmin; +} + int blkif_schedule(void *arg) { blkif_t *blkif = arg; struct vbd *vbd = &blkif->vbd; + int ret = 0; + struct timeval cur_time; blkif_get(blkif); @@ -232,12 +248,34 @@ int blkif_schedule(void *arg) blkif->waiting_reqs = 0; smp_mb(); /* clear flag *before* checking for work */ - if (do_block_io_op(blkif)) + ret = do_block_io_op(blkif); + if (ret) blkif->waiting_reqs = 1; unplug_queue(blkif);...
2007 May 15
3
[PATCH 1/12] Add suspend/resume to devices owned by Xen
...14 15:05:28 2007 -0400 @@ -60,6 +60,16 @@ struct cpu_time { static DEFINE_PER_CPU(struct cpu_time, cpu_time); +struct plt_timer_ops { + char* name; + int (*init)(void); + u64 (*read_count)(void); + void (*suspend)(void); + void (*resume)(void); +}; + +struct plt_timer_ops *cur_timer; + /* * Protected by platform_timer_lock, which must be acquired with interrupts * disabled because pit_overflow() is called from PIT ch0 interrupt context. @@ -68,7 +78,6 @@ static u64 platform_timer_stamp; static u64 platform_timer_stamp; static struct time_scale platform_timer_scale; s...
2013 Mar 04
2
[PATCH 1/2] Btrfs: fix wrong handle at error path of create_snapshot() when the commit fails
...*/ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info, @@ -1072,7 +1077,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, struct extent_buffer *tmp; struct extent_buffer *old; struct timespec cur_time = CURRENT_TIME; - int ret; + int ret = 0; u64 to_reserve = 0; u64 index = 0; u64 objectid; @@ -1081,40 +1086,36 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, path = btrfs_alloc_path(); if (!path) { - ret = pending->error = -ENOMEM; - return ret;...
2007 Apr 18
0
[RFC, PATCH 22/24] i386 Consolidate redundant timer code
...;Using HPET for base-timer\n"); } @@ -479,11 +484,6 @@ void __init time_init(void) return; } #endif - xtime.tv_sec = get_cmos_time(); - xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); - set_normalized_timespec(&wall_to_monotonic, - -xtime.tv_sec, -xtime.tv_nsec); - cur_timer = select_timer(); printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name); Index: linux-2.6.16-rc6/arch/i386/kernel/timers/common.c =================================================================== --- linux-2.6.16-rc6.orig/arch/i386/kernel/timers/common.c 2006-0...
2007 Apr 18
0
[RFC, PATCH 22/24] i386 Consolidate redundant timer code
...;Using HPET for base-timer\n"); } @@ -479,11 +484,6 @@ void __init time_init(void) return; } #endif - xtime.tv_sec = get_cmos_time(); - xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); - set_normalized_timespec(&wall_to_monotonic, - -xtime.tv_sec, -xtime.tv_nsec); - cur_timer = select_timer(); printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name); Index: linux-2.6.16-rc6/arch/i386/kernel/timers/common.c =================================================================== --- linux-2.6.16-rc6.orig/arch/i386/kernel/timers/common.c 2006-0...
2013 Dec 13
2
[PATCH] Btrfs: fix error check of btrfs_lookup_dentry()
...type_table[] = { diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9d46f60..716779c 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -389,6 +389,7 @@ static noinline int create_subvol(struct inode *dir, struct btrfs_root *new_root; struct btrfs_block_rsv block_rsv; struct timespec cur_time = CURRENT_TIME; + struct inode *inode; int ret; int err; u64 objectid; @@ -550,8 +551,14 @@ fail: if (err && !ret) ret = err; - if (!ret) - d_instantiate(dentry, btrfs_lookup_dentry(dir, dentry)); + if (!ret) { + inode = btrfs_lookup_dentry(dir, dentry); + if (IS_ERR(inode)...
2012 Aug 01
17
[PATCH] add crtime to the snapshot list
From: Anand <anand.jain@oracle.com> This patch adds creation-time to the snapshot list display, which would help user to better manage the snapshots when number of snapshots grow substantially. This patch is developed and on top of the send/receive btrfs and btrfs-progs repo at git://github.com/ablock84/linux-btrfs.git (send-v2) git://github.com/ablock84/btrfs-progs.git (send-v2)
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...========================================================= --- linux-2.6.16-rc6.orig/include/asm-i386/timer.h 2006-03-12 19:57:42.000000000 -0800 +++ linux-2.6.16-rc6/include/asm-i386/timer.h 2006-03-12 19:57:48.000000000 -0800 @@ -48,6 +48,8 @@ extern int pit_latch_buggy; extern struct timer_opts *cur_timer; extern int timer_ack; +extern int use_sched_clock_cycles; + /* list of externed timers */ extern struct timer_opts timer_none; extern struct timer_opts timer_pit; @@ -70,9 +72,18 @@ extern unsigned long calibrate_tsc_hpet( extern struct init_timer_opts timer_pmtmr_init; #endif +#ifdef...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...========================================================= --- linux-2.6.16-rc6.orig/include/asm-i386/timer.h 2006-03-12 19:57:42.000000000 -0800 +++ linux-2.6.16-rc6/include/asm-i386/timer.h 2006-03-12 19:57:48.000000000 -0800 @@ -48,6 +48,8 @@ extern int pit_latch_buggy; extern struct timer_opts *cur_timer; extern int timer_ack; +extern int use_sched_clock_cycles; + /* list of externed timers */ extern struct timer_opts timer_none; extern struct timer_opts timer_pit; @@ -70,9 +72,18 @@ extern unsigned long calibrate_tsc_hpet( extern struct init_timer_opts timer_pmtmr_init; #endif +#ifdef...
2007 Apr 18
43
[RFC PATCH 00/35] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides the same platform interface as running natively on the hardware, paravirtualization requires modification to the guest operating system to work with the platform interface provided by the hypervisor. Xen was designed with performance in mind. Calls to the hypervisor are minimized, batched if necessary, and non-critical codepaths
2007 Apr 18
43
[RFC PATCH 00/35] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides the same platform interface as running natively on the hardware, paravirtualization requires modification to the guest operating system to work with the platform interface provided by the hypervisor. Xen was designed with performance in mind. Calls to the hypervisor are minimized, batched if necessary, and non-critical codepaths