File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
packages/orchestrator/internal/sandbox/uffd Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,6 @@ func (u *Uffd) handle(sandboxId string) error {
145
145
}
146
146
}()
147
147
148
- fmt .Fprintf (os .Stderr , "uffd: serving: %d\n " , len (m ))
149
-
150
148
u .readyCh <- struct {}{}
151
149
152
150
err = uffd .Serve (
@@ -156,7 +154,6 @@ func (u *Uffd) handle(sandboxId string) error {
156
154
zap .L ().With (logger .WithSandboxID (sandboxId )),
157
155
)
158
156
if err != nil {
159
- fmt .Fprintf (os .Stderr , "serve error %v" , err )
160
157
return fmt .Errorf ("failed handling uffd: %w" , err )
161
158
}
162
159
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ E -- write (WP|WRITE flag) --> F(remove WP) --> C
14
14
import (
15
15
"errors"
16
16
"fmt"
17
- "os"
18
17
"syscall"
19
18
"unsafe"
20
19
@@ -33,15 +32,14 @@ func (u *userfaultfd) Serve(
33
32
fdExit * fdexit.FdExit ,
34
33
logger * zap.Logger ,
35
34
) error {
36
- defer fmt .Fprintf (os .Stderr , "exiting serve >>>>>>>>>>>>" )
37
35
pollFds := []unix.PollFd {
38
36
{Fd : int32 (u .fd ), Events : unix .POLLIN },
39
37
{Fd : int32 (fdExit .Reader ()), Events : unix .POLLIN },
40
38
}
41
39
42
40
var eg errgroup.Group
43
41
44
- missingChunksBeingHandled := map [int64 ]struct {}{}
42
+ handledPages := map [int64 ]struct {}{}
45
43
46
44
outerLoop:
47
45
for {
@@ -143,11 +141,11 @@ outerLoop:
143
141
// This prevents serving missing pages multiple times.
144
142
// For normal sized pages with swap on, the behavior seems not to be properly described in docs
145
143
// and it's not clear if the missing can be legitimately triggered multiple times.
146
- if _ , ok := missingChunksBeingHandled [offset ]; ok {
144
+ if _ , ok := handledPages [offset ]; ok {
147
145
continue
148
146
}
149
147
150
- missingChunksBeingHandled [offset ] = struct {}{}
148
+ handledPages [offset ] = struct {}{}
151
149
152
150
eg .Go (func () error {
153
151
defer func () {
You can’t perform that action at this time.
0 commit comments