Reverse Copy-on-Write Memory Page Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing copy-on-write operations in computer systems lead to inefficiencies such as flushing of translation caches and separate caching of memory mappings, which can result in reduced cache utilization and performance when multiple tasks share a memory page and one task needs to update it.

Innovation Solution

Implementing reverse copy-on-write operations, where a memory management module creates a new copy of the memory page for non-updating tasks and redirects them to it, allowing the updating task to modify the original page without invalidating existing cache mappings, thereby preserving cache utilization and deferring caching until necessary.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional copy-on-write operations are used when a task needs to update a shared memory page, then the updating task can modify the memory page, but the translation cache must be flushed and memory mappings must be separately cached, reducing cache utilization and performance

Engineering Contradiction:
Improvememory update correctnessVSAvoidcache utilization and performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Instead of copying the memory page to the updating task (traditional copy-on-write), the patent inverts the approach by copying the memory page to the non-updating tasks. This allows the updating task to modify the original shared page without cache invalidation, while non-updating tasks receive their own copy to prevent them from seeing stale data. This inversion resolves the contradiction by maintaining cache efficiency for the active task while still providing memory isolation for inactive tasks.

Inventive Principle:
Principle #13The other way round (Inversion)

Solution Approach 2:

The patent applies different cache management strategies to different tasks based on their activity status. Active tasks that need to update memory pages continue to share the original page with full cache utilization, while inactive tasks receive separate copies with deferred caching. This local differentiation resolves the contradiction by optimizing cache usage for each task's specific needs rather than applying a uniform copy-on-write approach to all tasks.

Inventive Principle:
Principle #3Local quality

2Reliability

If the translation cache is flushed to maintain consistency when memory mappings change, then data consistency is maintained, but cache utilization and performance deteriorate

Engineering Contradiction:
Improvedata consistencyVSAvoidcache invalidation overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent inverts the traditional copy-on-write mechanism so that instead of invalidating caches when creating a copy for the updating task, the cache is only copied for non-updating tasks. This allows the updating task to modify the shared memory page without any cache invalidation, eliminating the time loss associated with flushing translation caches while maintaining data consistency through selective copying for inactive tasks.

Inventive Principle:
Principle #13The other way round (Inversion)

Solution Approach 2:

The patent uses selective copying of memory pages and cache entries only for non-updating tasks, rather than copying for all tasks. This targeted copying approach maintains data consistency for tasks that don't need to update memory while avoiding the performance penalty of cache flushing for active tasks. The copying is performed lazily and selectively based on task activity status.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS9471226B2Reverse copy on write for better cache utilization
Publication Date: 2016.10.18 RED HAT ISRAEL
  • US9471226B2 patent drawing
  • US9471226B2 patent drawing
  • US9471226B2 patent drawing

AI summary

Methods, systems, and computer program products for providing reverse copy-on-write for improved cache utilization are disclosed. Examples generally relate to both physical and virtualized computer systems. A computer-implemented method may include detecting when a first task is to write to a memory page that is shared with a second task, creating a copy of the memory page for use by the second task, and modifying a memory mapping to associate the second task with the copy of the memory page. In a virtualized computer system, a hypervisor may detect when a first virtual machine is to write to a memory page shared with a second virtual machine, create a copy of the memory page for the second virtual machine, and adjust a memory mapping to associate the second virtual machine with the copy of the memory page.