This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/sys/kern/kern_prot.c | |
+++ b/sys/kern/kern_prot.c | |
@@ -2045,12 +2045,22 @@ crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups) | |
int i; | |
int j; | |
gid_t g; | |
+ unsigned int sorted = 0; | |
KASSERT(cr->cr_agroups >= ngrp, ("cr_ngroups is too small")); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Verify that single thread, unshared file descriptor tables are freed | |
*/ | |
#include <stdio.h> | |
#include <unistd.h> | |
void dupfds() | |
{ | |
int i, fd; | |
int fds[128]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Make sure that processes with multiple threads don't have old | |
* file descriptor tables freed. | |
*/ | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
void *dupfds() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/sys/kern/kern_descrip.c | |
+++ b/sys/kern/kern_descrip.c | |
@@ -130,7 +130,8 @@ static int getmaxfd(struct thread *td); | |
* resource limit). | |
* | |
* Since threads may hold references to individual descriptor table | |
- * entries, the tables are never freed. Instead, they are placed on a | |
+ * entries, the tables are only freed if a process has one thread and | |
+ * the table has not been shared. Otherwise, they are placed on a | |
* linked list and freed only when the struct filedesc is released. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ encoding git:(master) ✗ go test -bench=. | |
PASS | |
BenchmarkThriftSerialize-8 300000 3364 ns/op | |
BenchmarkJsonSerialize-8 200000 7623 ns/op | |
BenchmarkPbSerialize-8 200000 5578 ns/op | |
BenchmarkThriftDeserialize-8 200000 6390 ns/op | |
BenchmarkJsonDeserialize-8 100000 18291 ns/op | |
BenchmarkPbDeserialize-8 200000 7358 ns/op | |
ok code.wirelessregistry.com/util/encoding 8.812s | |
➜ encoding git:(master) ✗ go test -bench=. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spec: | |
containers: | |
- name: test-server | |
image: 172.16.45.2:5000/test-service:0.2.1-test | |
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export KUBE_VERSION=1.2.4 | |
export ETCD_VERSION=2.3.5 | |
export nodes="[email protected]" | |
export role="ai i i" | |
export NUM_NODES=1 | |
# The range must match the Vagrant private network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APP_SRC=${GOPATH} | |
APP_BIN=bin | |
BINARY=test-service | |
VERSION=0.2.1 | |
.PHONY: all | |
all: dev | |
.PHONY: clean | |
clean: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if msg.Type == ADDED || msg.Type == MODIFIED { | |
var service discovery.Service | |
// ClusterIP services are only accessible inside the cluster. They | |
// should be located with env vars provided by k8s. We will only announce | |
// externally available services here. | |
if msg.Object.Spec.Type == LOADBALANCER { | |
endpoints := make([]string, 0, len(msg.Object.Spec.Ports)*len(msg.Object.Status.LoadBalancer.Ingress)) | |
for _, ingress := range msg.Object.Status.LoadBalancer.Ingress { | |
for _, port := range msg.Object.Spec.Ports { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// While we are supposed to be processing, make sure to reestablish the | |
// client connection if anything unexpected happens. | |
for processing { | |
ch, err := client.Watch() | |
if err != nil { | |
glog.Error(err) | |
} else { | |
validChannel := true | |
msg := Event{} |
NewerOlder