A data processing system for performing a hardware transactional memory transaction associated to a thread, the data processing system comprising: a byte-addressable nonvolatile memory for persistently storing data, the nonvolatile memory comprising a log records area and an application data area; a multithreaded processor; and a private cache memory to the processor; the processor being configured to: - execute an atomic HTM write operation; - commit the HTM transaction by writing a commit record to the log records area of the nonvolatile memory indicating a successful commit of the HTM transaction thereby setting the HTM transaction in a logged state; - log a write operation associated with the HTM transaction in the log records area of the nonvolatile memory prior to the successful commit of the HTM transaction; - flush the data written by the HTM write operation from the private cache memory to the application data area of the nonvolatile memory after the successful commit of the HTM transaction; and characterized in that the processor is further configured to: - set the HTM transaction to an unlogged state by unsetting the commit record, after the successful flushing of the data; and wherein the data processing system further comprises a recovery unit configured to: - redo the log upon a restart of the data processing system, if the log of the write operation associated with the HTM transaction is present in the nonvolatile memory and if the commit record is set, and - set the HTM transaction to an unlogged state by unsetting the commit record, if the redo of the transaction is completed. a byte-addressable nonvolatile memory for persistently storing data, the nonvolatile memory comprising a log records area and an application data area; a multithreaded processor; and a private cache memory to the processor; the processor being configured to: - execute an atomic HTM write operation; - commit the HTM transaction by writing a commit record to the log records area of the nonvolatile memory indicating a successful commit of the HTM transaction thereby setting the HTM transaction in a logged state; - log a write operation associated with the HTM transaction in the log records area of the nonvolatile memory prior to the successful commit of the HTM transaction; - flush the data written by the HTM write operation from the private cache memory to the application data area of the nonvolatile memory after the successful commit of the HTM transaction; and - execute an atomic HTM write operation; - commit the HTM transaction by writing a commit record to the log records area of the nonvolatile memory indicating a successful commit of the HTM transaction thereby setting the HTM transaction in a logged state; - log a write operation associated with the HTM transaction in the log records area of the nonvolatile memory prior to the successful commit of the HTM transaction; - flush the data written by the HTM write operation from the private cache memory to the application data area of the nonvolatile memory after the successful commit of the HTM transaction; and characterized in that the processor is further configured to: - set the HTM transaction to an unlogged state by unsetting the commit record, after the successful flushing of the data; and - set the HTM transaction to an unlogged state by unsetting the commit record, after the successful flushing of the data; and wherein the data processing system further comprises a recovery unit configured to: - redo the log upon a restart of the data processing system, if the log of the write operation associated with the HTM transaction is present in the nonvolatile memory and if the commit record is set, and - set the HTM transaction to an unlogged state by unsetting the commit record, if the redo of the transaction is completed. - redo the log upon a restart of the data processing system, if the log of the write operation associated with the HTM transaction is present in the nonvolatile memory and if the commit record is set, and - set the HTM transaction to an unlogged state by unsetting the commit record, if the redo of the transaction is completed.