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 @@ -155,8 +155,6 @@ func (u *Uffd) handle(ctx context.Context, sandboxId string) error {
155155 }
156156 }()
157157
158- fmt .Fprintf (os .Stderr , "uffd: serving: %d\n " , len (m ))
159-
160158 u .readyCh <- struct {}{}
161159
162160 err = Serve (
@@ -168,7 +166,6 @@ func (u *Uffd) handle(ctx context.Context, sandboxId string) error {
168166 zap .L ().With (logger .WithSandboxID (sandboxId )),
169167 )
170168 if err != nil {
171- fmt .Fprintf (os .Stderr , "serve error %v" , err )
172169 return fmt .Errorf ("failed handling uffd: %w" , err )
173170 }
174171
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import (
1515 "context"
1616 "errors"
1717 "fmt"
18- "os"
1918 "syscall"
2019 "unsafe"
2120
@@ -35,15 +34,14 @@ func (u *userfaultfd) Serve(
3534 fdExit * fdexit.FdExit ,
3635 logger * zap.Logger ,
3736) error {
38- defer fmt .Fprintf (os .Stderr , "exiting serve >>>>>>>>>>>>" )
3937 pollFds := []unix.PollFd {
4038 {Fd : int32 (u .fd ), Events : unix .POLLIN },
4139 {Fd : int32 (fdExit .Reader ()), Events : unix .POLLIN },
4240 }
4341
4442 var eg errgroup.Group
4543
46- missingChunksBeingHandled := map [int64 ]struct {}{}
44+ handledPages := map [int64 ]struct {}{}
4745
4846outerLoop:
4947 for {
@@ -145,11 +143,11 @@ outerLoop:
145143 // This prevents serving missing pages multiple times.
146144 // For normal sized pages with swap on, the behavior seems not to be properly described in docs
147145 // and it's not clear if the missing can be legitimately triggered multiple times.
148- if _ , ok := missingChunksBeingHandled [offset ]; ok {
146+ if _ , ok := handledPages [offset ]; ok {
149147 continue
150148 }
151149
152- missingChunksBeingHandled [offset ] = struct {}{}
150+ handledPages [offset ] = struct {}{}
153151
154152 eg .Go (func () error {
155153 defer func () {
You can’t perform that action at this time.
0 commit comments