Skip to content

Instantly share code, notes, and snippets.

View jerrinsg's full-sized avatar

Jerrin Shaji George jerrinsg

View GitHub Profile
This file has been truncated, but you can view the full file.
$ python3 sieve.py -c examples/kapp-controller -w create -m learn --build-oracle
Running Sieve with mode: learn...
Sieve result dir: sieve_learn_results/kapp-controller/create/learn
Config for learn mode: sieve_learn_results/kapp-controller/create/learn/learn.yaml
Deleting cluster "kind" ...
Trying to create kind cluster
Creating cluster "kind" ...
✓ Ensuring node image (ghcr.io/sieve-project/action/node:v1.24.10-learn) 🖼
✓ Preparing nodes 📦 📦 📦
✓ Writing configuration 📜
@jerrinsg
jerrinsg / map.c
Created February 19, 2021 07:49
Program to map a persistent memory file
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/mman.h>
#define MAP_SYNC 0x80000
#define MAP_SHARED_VALIDATE 0x03
#define FILE_LEN 1024 * 1024 // 1MB
@jerrinsg
jerrinsg / list.c
Last active June 23, 2019 22:38
A persistent memory linked list application written using PMDK library
#include <ex_common.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "pmemobj_list.h"
POBJ_LAYOUT_BEGIN(list);
POBJ_LAYOUT_ROOT(list, struct root);
POBJ_LAYOUT_TOID(list, struct entry);
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <stdint.h>
#define PAGE_SHIFT 12
#include <linux/kernel.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
#include <xmmintrin.h>
#include <stdio.h>
$ git clone https://path/repo/git
Initialized empty Git repository in /path/to/location
(gnome-ssh-askpass:4449): Gtk-WARNING **: cannot open display:
$ unset SSH_ASKPASS
$ git clone https://path/repo/git
Initialized empty Git repository in /path/to/location
=============================================================================================================================
[ 389.256897] BUG: unable to handle kernel NULL pointer dereference at 00000008
[ 389.256897] IP: [<c1301ae1>] rb_next+0x1/0x40
[ 389.256897] *pdpt = 0000000026b97001 *pde = 0000000000000000
[ 389.256897] Oops: 0000 [#1] SMP
[ 389.256897] Modules linked in: testmodule(OX) nfsv3 radeon nfsd auth_rpcgss nfs_acl nfs bnep rfcomm bluetooth lockd sunrpc ttm fscache drm_kms_helper drm gpio_ich dcdbas i2c_alge
[ 389.256897] CPU: 3 PID: 1727 Comm: npu_work Tainted: G W OX 3.13.11-ckt15+ #105
[ 389.256897] Hardware name: Dell Computer Corporation PowerEdge 2850/0T7971, BIOS A06 10/03/2006
[ 389.256897] task: eed48e70 ti: e75d8000 task.ti: e75d8000
[ 389.256897] EIP: 0060:[<c1301ae1>] EFLAGS: 00010046 CPU: 3
[ 389.256897] EIP is at rb_next+0x1/0x40
unsigned volatile int migrate_flag;
EXPORT_SYMBOL(migrate_flag);
static int migrate_to(void *data)
{
struct migration_arg *arg = (struct migration_arg *)data;
struct rq *rq;
local_irq_disable();
rq = task_rq( arg->task );
raw_spin_lock(&((arg->task)->pi_lock));