@@ -8,7 +8,7 @@ use std::sync::atomic::AtomicUsize;
8
8
use std:: sync:: Arc ;
9
9
use std:: time:: Duration ;
10
10
11
- use logger:: { debug , error, IncMetric , METRICS } ;
11
+ use logger:: { error, IncMetric , METRICS } ;
12
12
use serde:: Serialize ;
13
13
use timerfd:: { ClockId , SetTimeFlags , TimerFd , TimerState } ;
14
14
use utils:: eventfd:: EventFd ;
@@ -158,7 +158,6 @@ impl Balloon {
158
158
stats_polling_interval_s : u16 ,
159
159
restored : bool ,
160
160
) -> Result < Balloon , BalloonError > {
161
- debug ! ( "creating new balloon" ) ;
162
161
let mut avail_features = 1u64 << VIRTIO_F_VERSION_1 ;
163
162
164
163
if deflate_on_oom {
@@ -208,45 +207,32 @@ impl Balloon {
208
207
}
209
208
210
209
pub ( crate ) fn process_inflate_queue_event ( & mut self ) -> Result < ( ) , BalloonError > {
211
- debug ! ( "balloon: inflate queue event" ) ;
212
210
self . queue_evts [ INFLATE_INDEX ]
213
211
. read ( )
214
212
. map_err ( BalloonError :: EventFd ) ?;
215
- self . process_inflate ( ) ?;
216
- debug ! ( "balloon: inflate queue event done" ) ;
217
- Ok ( ( ) )
213
+ self . process_inflate ( )
218
214
}
219
215
220
216
pub ( crate ) fn process_deflate_queue_event ( & mut self ) -> Result < ( ) , BalloonError > {
221
- debug ! ( "balloon: deflate queue event" ) ;
222
217
self . queue_evts [ DEFLATE_INDEX ]
223
218
. read ( )
224
219
. map_err ( BalloonError :: EventFd ) ?;
225
- self . process_deflate_queue ( ) ?;
226
- debug ! ( "balloon: deflate queue event done" ) ;
227
- Ok ( ( ) )
220
+ self . process_deflate_queue ( )
228
221
}
229
222
230
223
pub ( crate ) fn process_stats_queue_event ( & mut self ) -> Result < ( ) , BalloonError > {
231
- debug ! ( "balloon: process stats queue event" ) ;
232
224
self . queue_evts [ STATS_INDEX ]
233
225
. read ( )
234
226
. map_err ( BalloonError :: EventFd ) ?;
235
- self . process_stats_queue ( ) ?;
236
- debug ! ( "balloon: process stats queue event finished" ) ;
237
- Ok ( ( ) )
227
+ self . process_stats_queue ( )
238
228
}
239
229
240
230
pub ( crate ) fn process_stats_timer_event ( & mut self ) -> Result < ( ) , BalloonError > {
241
- debug ! ( "balloon: process stats timer event" ) ;
242
231
self . stats_timer . read ( ) ;
243
- self . trigger_stats_update ( ) ?;
244
- debug ! ( "balloon: process stats timer event done" ) ;
245
- Ok ( ( ) )
232
+ self . trigger_stats_update ( )
246
233
}
247
234
248
235
pub ( crate ) fn process_inflate ( & mut self ) -> Result < ( ) , BalloonError > {
249
- debug ! ( "balloon: process inflate queue" ) ;
250
236
// This is safe since we checked in the event handler that the device is activated.
251
237
let mem = self . device_state . mem ( ) . unwrap ( ) ;
252
238
METRICS . balloon . inflate_count . inc ( ) ;
@@ -330,19 +316,14 @@ impl Balloon {
330
316
}
331
317
}
332
318
333
- debug ! ( "balloon: process inflate queue finished, interrupting..." ) ;
334
-
335
319
if needs_interrupt {
336
320
self . signal_used_queue ( ) ?;
337
321
}
338
322
339
- debug ! ( "balloon: process inflate queue finally finished" ) ;
340
-
341
323
Ok ( ( ) )
342
324
}
343
325
344
326
pub ( crate ) fn process_deflate_queue ( & mut self ) -> Result < ( ) , BalloonError > {
345
- debug ! ( "balloon: process deflate queue" ) ;
346
327
// This is safe since we checked in the event handler that the device is activated.
347
328
let mem = self . device_state . mem ( ) . unwrap ( ) ;
348
329
METRICS . balloon . deflate_count . inc ( ) ;
@@ -358,17 +339,13 @@ impl Balloon {
358
339
}
359
340
360
341
if needs_interrupt {
361
- debug ! ( "balloon: process deflate queue finished, interrupting..." ) ;
362
- self . signal_used_queue ( ) ?;
363
- debug ! ( "balloon: process deflate queue finished" ) ;
364
- Ok ( ( ) )
342
+ self . signal_used_queue ( )
365
343
} else {
366
344
Ok ( ( ) )
367
345
}
368
346
}
369
347
370
348
pub ( crate ) fn process_stats_queue ( & mut self ) -> std:: result:: Result < ( ) , BalloonError > {
371
- debug ! ( "balloon: process stats queue" ) ;
372
349
// This is safe since we checked in the event handler that the device is activated.
373
350
let mem = self . device_state . mem ( ) . unwrap ( ) ;
374
351
METRICS . balloon . stats_updates_count . inc ( ) ;
@@ -403,8 +380,6 @@ impl Balloon {
403
380
self . stats_desc_index = Some ( head. index ) ;
404
381
}
405
382
406
- debug ! ( "balloon: process stats queue finished" ) ;
407
-
408
383
Ok ( ( ) )
409
384
}
410
385
0 commit comments