Commit 0779405
committed
[nrf fromtree] zms: optimize write function by skipping unnecessary reads
when performing a write ZMS checks if the data exists in the storage to
avoid double writing the same data and save some memory cycle life time.
However this downgrades the write performance.
Enable this feature only when CONFIG_ZMS_NO_DOUBLE_WRITE is enabled.
Signed-off-by: Riadh Ghaddab <[email protected]>
(cherry picked from commit e0f0256)1 parent ff1e827 commit 0779405
3 files changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1392 | 1392 | | |
1393 | 1393 | | |
1394 | 1394 | | |
1395 | | - | |
1396 | 1395 | | |
1397 | 1396 | | |
1398 | 1397 | | |
1399 | 1398 | | |
1400 | | - | |
1401 | 1399 | | |
1402 | 1400 | | |
1403 | 1401 | | |
| |||
1428 | 1426 | | |
1429 | 1427 | | |
1430 | 1428 | | |
| 1429 | + | |
1431 | 1430 | | |
1432 | | - | |
| 1431 | + | |
| 1432 | + | |
1433 | 1433 | | |
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | 1437 | | |
1441 | 1438 | | |
1442 | 1439 | | |
| |||
1473 | 1470 | | |
1474 | 1471 | | |
1475 | 1472 | | |
| 1473 | + | |
1476 | 1474 | | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
1477 | 1478 | | |
1478 | 1479 | | |
1479 | 1480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
| |||
558 | 559 | | |
559 | 560 | | |
560 | 561 | | |
| 562 | + | |
561 | 563 | | |
562 | 564 | | |
563 | 565 | | |
| |||
0 commit comments